human-essentials icon indicating copy to clipboard operation
human-essentials copied to clipboard

Adding reporting categories to items (and base items)

Open cielf opened this issue 10 months ago • 11 comments

Summary

Rework annual reporting so that it is based on properties that are directly on the items, rather than looking at the base items

Why

Details

This will involve adding a new "NDBN reporting category" concept to the items This will include disposable diapers; cloth diapers; adult incontinence; period underwear; pads; period liners; tampons; period reusables; period other.

We will add the reporting categories to the base items and populate it according to rules followed in the annual report. (they are complicated). Note that period items are going to be split out further than they currently are.

Then we copy the reporting categories from the base items to the current items.

When new banks are created, the new items will have the reporting categories from the corresponding base item.

Annual reports will need to be changed to use the new reporting categories. This is also a significant chunk of work.

We should change "filter by base item" to "filter by reporting category"

This field should not be populated / editable for items that are representing kits. (they have base item kit, but there are other ways to tell and we should rely on those to check this.) It should be mandatory otherwise, though.

Implement this is a way that it would be relatively easy to add in new reporting categories -- we don't expect to have changes more than once every couple years. A simple crud interface for superadmins would be ideal or we can just do a data migration as needed.

Once this is all done, we will be able to remove the direct link from base item to item and make the base items merely the seed.

Criteria for completion

  • [ ] behaviour as described
  • [ ] tests to support the above behaviour
  • [ ] update user guide to support the above behaviour

Suggested breakout

Step 1

--- add fields to base item ---- we could do the population of the base items 'by hand' instead of algorithmically. That makes a lot of sense. (CL can provide the mapping)

Step 2

--- add fields to item.
--- migration of the current from base items to items, and reporting categories on population of items for new banks from the base items

Step 3

--- make the changes to the annual report -- this will need to be fleshed out a bit. (CL to flesh out)

Step 4

--- allow viewing/editing of the report category on items.
--- add filtering by report category where we now have filtering by base item --- remove filtering by base item

cielf avatar Feb 10 '25 23:02 cielf

Will users be able to set the reporting_category for an item to be value they want? Or will we limit the options to only those mentioned (Adult Incontinence, Cloth diapers, etc)?

coalest avatar Feb 20 '25 09:02 coalest

Only those mentioned. It is possible that we may add reporting categories in the future, but this is essentially something so they can say how it gets counted in the Annual Survey.

cielf avatar Feb 20 '25 15:02 cielf

@cielf For the reporting categories, I noticed that most of the values are title case ("Cloth Diapers" and "Adult Incontinence"), except for one: "Disposable diapers" (lower case d in diapers).

Is it okay if I make it "Disposable Diapers" instead? That will make it easier for me to humanize the categories.

coalest avatar Feb 24 '25 12:02 coalest

I'm fine with that -- it was almost certainly a slip of the fingers.

cielf avatar Feb 25 '25 01:02 cielf

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

github-actions[bot] avatar Mar 28 '25 00:03 github-actions[bot]

not stale. I think it's waiting for something from me

cielf avatar Mar 28 '25 00:03 cielf

Hey @coalest -- did we include "Other" as a reporting category? I'm looking at this now regarding a different issue, and not seeing it in the original description

cielf avatar Apr 26 '25 11:04 cielf

@cielf Yes, we did add an other reporting category. The mappings are still hard coded here for reference. (Although once everything is finished with the migration we could probably remove them from that class).

Sorry for the delay on wrapping up this task. I should find the time this weekend to wrap it up.

coalest avatar Apr 26 '25 14:04 coalest

I'd love to get it in, at least as far as merging, by the 7th if we can for stakeholder circle.

cielf avatar Apr 26 '25 19:04 cielf

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

github-actions[bot] avatar May 27 '25 00:05 github-actions[bot]

Automatically unassigned after 7 days of inactivity.

github-actions[bot] avatar Jun 03 '25 00:06 github-actions[bot]

All the sub-issues of this are completed as of a couple of weeks ago. Closing for that reason.

cielf avatar Sep 15 '25 00:09 cielf