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
20 stars 12 forks source link

Store's item visibility is not really/strictly respected in case of multiple stores in an oms-site #4592

Closed nishaDangol-Sussol closed 1 month ago

nishaDangol-Sussol commented 1 month ago

What went wrong? 😲

Store's item visibility is not really/strictly respected in case of multiple stores in an oms-site

Expected behaviour 🤔

Strictly follow item-visibility as per the master-list set for the store

How to Reproduce 🔨

Steps to reproduce the behaviour:

  1. Have multiple stores for your oms-site. Let's say StoreA with MasterListA only and StoreB with MasterListB only

  2. Setup user permissions to login accordingly

    image image
  3. Login to StoreA

  4. See Catalogue>Items

  5. See error: you'll see items from MasterListB as well

    image
  6. Login to StoreB

  7. See Catalogue>Items

  8. See error: you'll see items from MasterListA as well

Your environment 🌱

andreievg commented 1 month ago

@nishaDangol-Sussol is there any stock of that item? Because we've changed the visibility for item to show if there is some stock in the store (otherwise it can never be issued)

mark-prins commented 1 month ago

Can confirm that it's a valid issue - I have items which are in Opua but not in my Kopu store:

select i.ID, i.item_name, i.code
from list_master_name_join lmnj
join list_master_line lml on lmnj.list_master_ID = lml.item_master_ID
join item i on lml.item_ID = i.ID
where 
 name_ID <> '861102F624354F15ABEB48DC207A4C2D'  -- kopu
 and name_ID = '7D009E67B5BC4A9999E7E72D654C85D5' --opua

for example 'Captopril scored 25mg tabs' - this isn't shown in OG when logged into the kopu store

Screenshot 2024-08-16 at 2 57 28 PM

but does show in oms when logged into kopu:

Screenshot 2024-08-16 at 2 57 48 PM

and is available to issue in an outbound, although there is no stock:

Screenshot 2024-08-16 at 2 58 34 PM
andreievg commented 1 month ago

Daily triage, i think this is worth fixing in hotfix

andreievg commented 1 month ago

I also managed to replicate, added new item to just one store. At first it wasn't visible in the other store, but after stock was added for that item in another store, i could see it

roxy-dao commented 1 month ago

Closed in #4636

regotaina commented 3 weeks ago

🧪 Testing

Tested on V2.2.0 mSupply version: V7.16 Client/server Browser: Chrome

PASSED the test 👍🏾