-
-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add indicator fields to partner export #4843
Add indicator fields to partner export #4843
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Sukhpreet-s Taking a very quick look at this (not yet a real review), I think you missed a point in the requirements:
"Based on discussions with the stakeholder circle, the "Providing Period Supplies" and "Providing Diapers" should be based on whether there have been distributions with period supplies or with diapers in the last 12 months."
The main purpose for this indicator is to support annual reporting in January, so the idea of whether the partner is "currently" being supplied is what we're getting at. I do expect that 98 times out of 100, these will be the same in the wild
👋 @cielf, I’ve updated the indicator logic to ensure it only uses distributions from the last 12 months. When you have a moment, could you please take a quick look to confirm if this aligns with the requirements? Your feedback would be greatly appreciated. 🙏 Thank you! 😊 |
1ca43d3
to
95154fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was working with wrong version for this. Retesting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passes manual testing (after I brought down the right version!) I noticed one thing in the tests regarding the date of the distribution that should fail, but otherwise over to @dorner for technical comments.
@Sukhpreet-s looks good to me, but there's now a conflict. Can you fix please? |
…fields-to-partner-export - Kept both changes by fixing errors
Partial #3067
Description
This PR adds 2 new columns, at the end of existing columns, in the partner export file:
Providing Diapers
: "Y" or "N", depending if the partner has at least one distribution (in the last 12 months) with an item of scope:disposable
or:cloth_diapers
.Providing Period Supplies
: "Y" or "N", depending if the partner has at least one distribution (in the last 12 months) with an item of scope:period_supplies
.Note
The criteria for finding whether a Partner has been provided with "Diapers" is if the Partner has at least one distribution with an item of either
:disposable
OR:cloth_diapers
scope, OR both scopes.Note
The filter for finding distributions within the last 12 months is based on
issued_at
attribute ofDistribution
model.Example:
Type of change
How Has This Been Tested?
Manually and added test cases for:
:disposable
item, then it should have"Y"
for theProviding Diapers
column.:cloth_diapers
item, then it should have"Y"
for theProviding Diapers
column.:period_supplies
item, then it should have"Y"
for theProviding Period Supplies
column.:disposable
,:cloth_diapers
, and:period_supplies
) but the distribution is older than 12 months, then it should have "N" for bothProviding Diapers
andProviding Period Supplies
columns.