filters archived children from children_served_count#5265
Merged
dorner merged 1 commit intoJul 11, 2025
Merged
Conversation
Contributor
Author
|
I'd add the |
Collaborator
|
It being in draft suffices to tell us not to review yet. |
Contributor
Author
|
Double checked that the children_served_count is only called in impact_metrics. |
Collaborator
|
Over to @dorner for technical review |
dorner
requested changes
Jul 4, 2025
dorner
left a comment
Collaborator
There was a problem hiding this comment.
Lint is failing - suggestion given above.
|
|
||
| def children_served_count | ||
| children.count | ||
| children.reject { |child| child.archived? }.count |
Collaborator
There was a problem hiding this comment.
Suggested change
| children.reject { |child| child.archived? }.count | |
| children.count(&:archived?) |
Contributor
Author
There was a problem hiding this comment.
If I use this change it is the opposite of what we want. Let me check
children.count { |child| !child.archived? }
49ef211 to
2a63571
Compare
Contributor
Author
|
Should pass linter now. |
dorner
approved these changes
Jul 11, 2025
Contributor
|
@john-huang-121: Your PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #5246
Description
Previously 'Children served' is just a total count of Children. This change addresses that children whom are archived no longer counts towards 'Children served'
Type of change
How Has This Been Tested?
Sign in as org_admin1@example.com
Click Partner Agencies, then "All Partners"
Click on "Pawnee Parent Service"
Note the number of children served is shown in the second section.
Sign out.
Sign in as verified@example.com
Click on Children in the left hand menu
Choose a child and "Edit Child Details"
Check the archived checkbox and update child.
Log back into the admin and check that the number went down by 1.
Screenshots
Before:

After:

