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

Inactive items should not appear in item selection drop downs for distributions.

Open cielf opened this issue 2 years ago • 8 comments

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.

cielf avatar Dec 24 '23 15:12 cielf

I'll take this.

rowenwillabus avatar Dec 24 '23 20:12 rowenwillabus

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.

cielf avatar Dec 25 '23 14:12 cielf

Right. What I'm working on affects only the new method. I'll wrap this up within a few minutes.

rowenwillabus avatar Dec 25 '23 14:12 rowenwillabus

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 Jan 25 '24 00:01 github-actions[bot]

Automatically unassigned after 7 days of inactivity.

github-actions[bot] avatar Feb 02 '24 00:02 github-actions[bot]

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 avatar Mar 26 '24 16:03 cielf

@cielf reminder to take a look at this

dorner avatar May 24 '24 19:05 dorner

Apparently I'm mistaken. Inactive items are still appearing in item selection on new distributions on staging. They aren't on donations or purchases.

cielf avatar May 24 '24 21:05 cielf