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 15 forks source link

iSC/Cold chain/GAPS: do not show temperature ranges if they haven't been specified #5409

Open marthakeezy opened 1 week ago

marthakeezy commented 1 week ago

What went wrong? 😲

At the moment, it seems like when you add Location Type in OG mSupply, the temperature input is compulsory - e.g. it is pre-populated with 0, and there cannot be a blank value. However, not every Location Type needs to have temperature associated with it, and the user can leave it unchanged.

Screenshot 2024-11-14 at 6 35 35 PM

In omSupply though, it comes out as a temperature range 0-0, which can be confusing for the user and does not look nice.

Screenshot 2024-11-14 at 6 35 42 PM

Expected behaviour 🤔

As a solution, we can either:

How to Reproduce 🔨

Steps to reproduce the behaviour:

  1. In OG mSupply, create a Location Type with both 0 as values
  2. Sync omSupply
  3. Go to Inventory -> Locations -> click on an existing location or create a new one
  4. Once done, click on it and set the test temperature range
  5. See the range appear even if it is 0-0

Your environment 🌱

Chris-Petty commented 6 days ago

There's probably a GAPS pedant that'd say technically ALL locations have some sort of temperature range. Like a warehouse is probably ideally manages heat to keep it ~20C or whatever. And 0C-0C is perfectly valid, very tight range 🤪.

Srs though I'd have thunk maybe a flag to just say this location needs temperature monitoring that should be ticked before allowing temperature range?

I presume @adamdewey should have 2c on this.

marthakeezy commented 6 days ago

Further discussion in the chat:

Laché to Adam:

Ohhh I see, you're saying hide the options from the dropdown, as opposed to not including the range in parentheses if its 0-0 ... it is a different request but handling the same thing, so I think fine to have in same issue 🙏

Adam:

yeah exactly!

adamdewey commented 6 days ago

Srs though I'd have thunk maybe a flag to just say this location needs temperature monitoring that should be ticked before allowing temperature range?

I agree with this! I was thinking a checkbox with Is temperature controlled on it

adamdewey commented 6 days ago

Further discussion in the chat:

Laché to Adam:

Ohhh I see, you're saying hide the options from the dropdown, as opposed to not including the range in parentheses if its 0-0 ... it is a different request but handling the same thing, so I think fine to have in same issue 🙏

Adam:

yeah exactly!

This is talking about hiding Location types that don't have a temperature range defined from the Item Variants page:

image

jmbrunskill commented 5 days ago

@adamdewey So the agreed solution is to just not have a storage temperature type at all if it's defined as 0-0?

adamdewey commented 5 days ago

@adamdewey So the agreed solution is to just not have a storage temperature type at all if it's defined as 0-0?

Ideally the OG team (@Chris-Petty) would be able to add a checkbox and we base it on that I think?

andreievg commented 4 days ago

Good first issue, front end fix to just hide location types in GAPS stuff where temperature is 0 - 0

roxy-dao commented 3 days ago

Closed in #5518

marthakeezy commented 7 hours ago

🧪 Testing

V2.4.0-RC3

marthakeezy commented 6 hours ago

Hey team!

It looks like now, if the temperature range has a 0 at all, it doesn't show in omSupply

Image

Image

Image