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

Add models to support request units

Open dorner opened this issue 1 year ago • 9 comments

Resolves #4096

Description

This creates the models and fields necessary to support reporting units. For now this is a model-only change. This adds some simple validations and specs for them, as well as seed data.

dorner avatar Apr 26 '24 14:04 dorner

@dorner Hrm. I have to apologize -- I didn't come back into this issue and address the fact that we had settled on just "units" for the default units.

cielf avatar May 01 '24 16:05 cielf

@dorner I think we're going to need something on ItemRequest as well -- that' s the level that the packs or whatever will actually be requested.

cielf avatar May 01 '24 16:05 cielf

@cielf not sure how using "units" as the default changes anything... that should be purely on the display side. We said that we'd stick with null to indicate "no request unit" (which corresponds to "unit").

I've added the item request piece.

dorner avatar May 03 '24 20:05 dorner

@cielf not sure how using "units" as the default changes anything... that should be purely on the display side. We said that we'd stick with null to indicate "no request unit" (which corresponds to "unit").

Well, the description in the issue of what's required for the seed indicates diapers,and pads, rather than units. That would change.

cielf avatar May 04 '24 03:05 cielf

I've already addressed that in the seed - the defaults don't include diaper.

dorner avatar May 05 '24 14:05 dorner

@dorner Cool. I also think we don't need "reporting unit" on item -- that would always be "unit" , the way we are thinking of things now, right?

cielf avatar May 07 '24 16:05 cielf

@cielf pushed the fixes! So now it seems like all we have are organization request units, and a specific request unit selected on an item request. And the only validation is that the request unit on the item request needs to exist on the org.

dorner avatar May 10 '24 20:05 dorner

Hmm. That doesn't sound right? Let me take another look. We may have had a terminology mixup.

cielf avatar May 11 '24 01:05 cielf

Ooops wrong PR. @cielf changes not addressed :)

awwaiid avatar May 12 '24 16:05 awwaiid

@cielf updated!

dorner avatar May 15 '24 01:05 dorner

@dorner This is nitpicky and maybe a bit out of scope -- I ran the setup, and inspected the results -- I see a request with two ItemRequests for pads with different units. If we go forward in time to Packs #2, we aren't going to allow that. So maybe we should just have one level of item (in this case either packs or units) for each item on a request to avoid new developer confusion later?

cielf avatar May 22 '24 20:05 cielf

I'm ok with this as-is and can help make sure that packs-#2 doesn't get confused based on the existing test data.

awwaiid avatar May 24 '24 01:05 awwaiid

I'm ok with this as-is and can help make sure that packs-#2 doesn't get confused based on the existing test data.

WE'll need to add fixing the seed to packs #2, then, right? Sorry -- #3. I have added a note about the seed ti it.

cielf avatar May 24 '24 02:05 cielf

@dorner: Your PR Add models to support request units is part of today's Human Essentials production release: 2024.05.26. Thank you very much for your contribution!

github-actions[bot] avatar May 26 '24 14:05 github-actions[bot]