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

[Bug] Inventory imports should prevent modifying already-existing inventory

Open cielf opened this issue 1 year ago • 4 comments

Summary

The inventory import should be a safe operation for initial Essentials Bank location setup. Prevent importing if the location already has ANY inventory.

Why Fix

Reduction in new bank confusion. Of the banks that have imported inventory, about half have done it multiple times with confusing results.

Details

1/ When you import inventory, it should set the current inventory to be the level that is imported.

Importing inventory adds a positive adjustment in the amount imported.

New Information

Examples of ways that imports can go wrong before this fix:

  • If you double-click, you get doubled values.
  • If you open up the new storage location in two different tabs, you can import twice -- (CL thinks that's what happened in the latest case -- ITRC, the line items did not match between the two times, and it was 20 minutes apart)

Criteria for completion

  • [ ] Import CSV button disabled after clicking
  • [ ] For Storage Location Import, check after the button is clicked and give an error if the storage location already has ANY inventory
  • [ ] Importing inventory results in each item in the imported inventory having the inventory level specified in the import.
  • [ ] Tests to demonstrate this behavior

cielf avatar Jun 25 '23 14:06 cielf

Hey, i can work on this

fchatterji avatar Jun 28 '23 12:06 fchatterji

This issue has been inactive for 243 hours (10.13 days) and will be automatically unassigned after 117 more hours (4.88 days).

github-actions[bot] avatar Jul 09 '23 00:07 github-actions[bot]

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 Aug 09 '23 00:08 github-actions[bot]

Automatically unassigned after 7 days of inactivity.

github-actions[bot] avatar Aug 17 '23 00:08 github-actions[bot]

I'd like to take this on.

vincent-truong-dev avatar Apr 09 '24 18:04 vincent-truong-dev

Go for it!

dorner avatar Apr 09 '24 20:04 dorner

Automatically unassigned after 7 days of inactivity.

github-actions[bot] avatar Apr 17 '24 00:04 github-actions[bot]

Still working on this, could I get reassigned? My time got away from me a bit.

vincent-truong-dev avatar Apr 19 '24 23:04 vincent-truong-dev

You certainly can!

cielf avatar Apr 19 '24 23:04 cielf

Automatically unassigned after 7 days of inactivity.

github-actions[bot] avatar Apr 27 '24 00:04 github-actions[bot]

Could I get reassigned again? Got unassigned again. Not sure why this time since I had activity.

vincent-truong-dev avatar Apr 30 '24 00:04 vincent-truong-dev

Yeah -- it's not smart enough to look at the associated PR. Will reassign.

cielf avatar Apr 30 '24 02:04 cielf