Closed dorner closed 4 months ago
@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.
@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 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.
@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.
I've already addressed that in the seed - the defaults don't include diaper
.
@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 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.
Hmm. That doesn't sound right? Let me take another look. We may have had a terminology mixup.
Ooops wrong PR. @cielf changes not addressed :)
@cielf updated!
@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?
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.
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.
@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!
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.