Inactive items should not appear in item selection drop downs for distributions.
Summary
If you have "deleted" an item, it should not appear in item selection dropdowns for such functions as distributions.(They currently do).
Details
We recently made a change so that the InventoryItem is retained when the inventory item for a item drops to zero, in order to forestall some exceptions we were getting when such a thing could not be found.
However, now, if an item has had inventory, and then been "deleted" (i.e. is "inactive"), it is still showing up in the distribution dropdowns.
It shouldn't.
It also should not show up in any of the other "itemizables". On the original request around this, it was noted that they don't (as they shouldn't), but we should double-check.
Recreation
Sign in as org_admin go into Inventory | Inventory Items and delete Adult Large/XL Go to distributions New Distribution Fill in the partner and storage location. Check the list of items you can pick from. Adult Large XL will be there (at least with (0) for the amount.
Criteria for completion
- [ ] Active items, and only active items should not appear in the dropdown lists for distribution, That is, inactive items should be excluded.
- [ ] Test to that effect.
I'll take this.
Cool. Thanks. I just thought of a possible "gotcha". When we're editing distributions, there may be inactive items in the distribution. We need to make sure that those aren't affected.
Right. What I'm working on affects only the new method. I'll wrap this up within a few minutes.
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.
Automatically unassigned after 7 days of inactivity.
I'm pretty sure this has been fixed by a different PR now -- with another issue resulting. Will double check, and if so, close.
@cielf reminder to take a look at this
Apparently I'm mistaken. Inactive items are still appearing in item selection on new distributions on staging. They aren't on donations or purchases.