msupply-foundation / open-msupply

Open mSupply represents our most recent advancement in the Logistics Management Information System (LMIS), expanding on more than two decades of development inherited from the well-established legacy of the original mSupply.
https://msupply.foundation/open-msupply/
Other
23 stars 14 forks source link

iSC/Cold chain/GAPS: buggy Cold Storage Location selection in Equipment #5415

Closed marthakeezy closed 1 day ago

marthakeezy commented 1 week ago

What went wrong? 😲

Quite hard to describe, but I suspect (!) what the issue might be is when one asset is assigned to a location, the location selection disappears from the dropdown for other equipment entries?

Also, when a location is removed for an asset, you cannot add it back in. For context, I have 4 different locations, none of them are on hold, each location has been used before for testing with equipment etc.

Captured the bugs in this video

Expected behaviour 🤔

When we edit equipment, when one location is removed, it should still be in a selection even after removal -> when the location is selected, the number should go down to three, but then back to four if it's unassigned. Also more than one equipment can be assigned to a single location, so the option should not disappear for other entries.

How to Reproduce 🔨

Steps to reproduce the behaviour:

  1. Unclear! But what I've done while playing around:
  2. Go to Cold chain -> Equipment and assign a Cold storage location to an equipment you are testing
  3. Go to another equipment and see if that same location is available to be assigned
  4. When editing equipment, assign location -> save -> unassign it -> click on the dropdown again -> see that same location is not available to be selected again
  5. Buggy behaviour!

Your environment 🌱

lache-melvin commented 1 week ago

Also more than one equipment can be assigned to a single location, so the option should not disappear for other entries.

My understanding was the opposite - for GAPS, the location maps to only one equipment, so we can associate stock in that location with the storage capacity of that asset. Assets might have multiple locations (e.g. fridge-freezer has a fridge location and a freezer location), but those locations only belong to that one asset - can you confirm @adamdewey? 🙏

adamdewey commented 1 week ago

Yes, agree with @lache-melvin

Locations are not the location where the CCE is stored, they are "stock storage locations" and indicate where stock is stored.

So 1 or more Locations can be mapped to a CCE, but only 1 CCE can be mapped to a Location

We will use the Store GPS coordinates to track the physical locations of CCE.

marthakeezy commented 1 week ago

Ohhh my bad, should have clarified the difference between the fields as I assumed Location is literally a physical location of the asset. Thanks 🙏🏼

The other bug is still valid though, correct? -> When a location is removed from an asset -> changes saved -> if you click on the field, the recently removed location does not appear again

lache-melvin commented 1 day ago

Closed by #5563