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

Combine View Stock and Items #1131

Open mark-prins opened 1 year ago

mark-prins commented 1 year ago

The question has been raised - why is there a View Stock page and an Item page. Don't they do the same thing? While the two pages do differ, the follow up question is 'can we combine the two?'

We could add filters to show lines with available stock, which is the essential difference between the two lists. There are however some crucial differences between the list views.

Currently we have these columns in each list view:

Column Item View Stock
Item code
item name
batch
expiry
location
unit
pack size
pack quantity
stock on hand
supplier

If we are combining, the stock columns would need to be displayed for all items, even though most of them are unavailable. The quantity & SOH values would be 0, the other fields blank.

The list actions differ too, we would have to combine actions - viewing an item and editing a stock line from the same list view, or only showing stock lines from the item detail page, and editing via that. This is an extra step for users though.

From view stock, clicking on a stock line allows editing of the line:

image

From the item list, clicking on an item displays further details:

image
adamdewey commented 1 year ago

One feasible option could be to have an expandable nested table with stock lines appearing underneath items a la this:

image

And have different list actions depending if you're selecting an item line or a stock line?

Gwalior-84 commented 1 year ago

Great points, and, like much of life, there will be no perfect solution. I do like @adamdewey idea here. If we can find a way to satisfactorily combine the two in a way that will give full functionality (including, particularly, showing stock of all items in a masterlist, including those with no stock - currently not possible in OG) then I suggest that it is actually quite a good thing to keep Items and Stock as two quite separate things. They are combined in OG and that has often caused confusion amongst users.

GaryWilletts commented 1 year ago

I think keeping it simple and having two separate lists is way better, especially when you consider maintenance of the code. Look at the difference in mSupply OG. Looking at an item has a large number of tabs because there's a LOT of info that relates to an item. At the moment the Open mSupply item view shows next to nothing, that will grow hugely as the functionality grows (I assume, not having had anything to do with any design talk!). Using the same list for these two things will become increasingly hard. We've used combined windows in mSupply OG for some things similar to this and it's become a nightmare when you have to make changes.

adamdewey commented 1 year ago

Perhaps if we just added a way to group stock lines by item and then deep linked from there to the item catalogue page then it would be basically the same level of code maintenance and the only thing missing from the stock page would be items with 0 stock?

Rather then having to go to the item catalogue page to get an overall figure for the total across all stock lines

I found that a bit confusing in OG - I think it would be more intuitive if there was a template section (item page) and an instance section (stock page)

I.e. have item-related info in the stock page but not stock-related info in the item-page?

adamdewey commented 1 year ago

Thinking about it, they basically are combined in OG already as you have the stock view within the item page 🤔

mark-prins commented 1 year ago

Very useful input - thanks everyone!

My summary of the points above, please comment if this is incorrect:

adamdewey commented 1 year ago

Investigate if we can add an expanding panel to the item list ( to show stock lines ) only if we can do so without impacting performance ( my view on this is that if we could pull it off, then it is essentially a hidden feature for more advanced users, which wouldn't add confusion to normal users )

My suggestion was actually more to combine both items and stock pages into 1 page and then have the item list as expanding so you could see the stock info, I don't think we should add an expanding stock list to the item page if we're keeping a separate stock page too.

I think this is the bit that confused me in OG mSupply - there are 2 places where you can look at stock-related info, the stock page and the item page, which makes it confusing for the user to remember where to go to find the info they want.

I think it would be better to keep the stock info in one place and the item 'template' info in another place. (Or to combine them into 1, but not to scatter the info between the 2)

Perhaps a compromise would be to have a link from the item page to 'View stock' and then take the user to the stock page with a filter to show just that item?

(A side note - are items actually considered 'templates' of stock line instances? What happens if you change the item details after a stock line has been created? e.g. if you change the units of the item do the extant stock lines use the new unit or is there a snapshot of the unit that was taken from the item at the point of creation?)

adamdewey commented 1 year ago

Hmm, thinking about it again, it would kind of be ok to have the stock info in both places, as long as you also had the item info in both places.

I guess they could kind of be considered 'views' of the same data?

In OG mSupply you can view all stock for an item in the item page, but you can't go the other way and view the total item aggregate from the stock lines in the stock page.

i.e. here I can see all stock for an item in the item page:

image

But in the stock page (which is the place that feels most obvious to look for stock) you can't see the aggregate total for a particular item:

image

adamdewey commented 1 year ago

If we keep 2 pages it would be nice to have deep linking between the 2 pages - so you could view item details from the stock page and stock details from the item page.

mark-prins commented 1 year ago

I think this is the bit that confused me in OG mSupply - there are 2 places where you can look at stock-related info, the stock page and the item page, which makes it confusing for the user to remember where to go to find the info they want.

ah, ok. One of the key takeaways I remember from ux design work on websites is that people use different ways to do the same thing, and that having multiple ways to do something is overall beneficial. the more thoughtful users realise the duplication exists, wonder why and find it confusing if they can't see any rationale. Mostly though, people find a way that works for them and are oblivious to other paths.

that latter part is what I had in mind. If the extra functionality doesn't impact normal users ( and doesn't complicate the code maintainability, and performance ) then no reason to leave it out 🤷

are items actually considered 'templates' of stock line instances?

🤔 Mostly not - the item is linked by ID and aspect like the item name, code, unit etc all exist on the item record. Changing the item would affect what is shown for the stock line. The pricing is copied from the item to the stock line, and stock levels is also on the stock line.

adamdewey commented 1 year ago

ah, ok. One of the key takeaways I remember from ux design work on websites is that people use different ways to do the same thing, and that having multiple ways to do something is overall beneficial. the more thoughtful users realise the duplication exists, wonder why and find it confusing if they can't see any rationale. Mostly though, people find a way that works for them and are oblivious to other paths.

Oh yeah fair enough - I guess then maybe it's more that I felt it strange that in the stock page I can see individual stock lines for an item but I can't view the total quantity of those stock lines without exiting that page and going to look in the item page?

🤔 Mostly not - the item is linked by ID and aspect like the item name, code, unit etc all exist on the item record. Changing the item would affect what is shown for the stock line. The pricing is copied from the item to the stock line, and stock levels is also on the stock line.

Cool, so it's more like the item is the parent of the stock lines.

I think if we can just emphasise that parent-child relationship in the stock page via deep-linking both ways then it could be helpful?

And especially finding a way to display the aggregate total of the parent item in the stock page.

You can see an example here of how many batches of the same product one client has in their warehouse. It would pretty difficult to get a grasp of how many total there are without exiting this page and going and searching again in the item page:

image

@richardmoizeau, @Gwalior-84, @GaryWilletts - what are your thoughts?

Gwalior-84 commented 1 year ago

It has been a bit frustrating when training in OG 'To get a detailed view of what has happened to the stock of an Item, use the Items button, to get a quick view, use the Stock button'.

It certainly would help if you could navigate easily from one to the other, and vice versa.

emilyporrello commented 1 year ago

Hey everyone, just adding in my two cents here... Consolidating the inventory information into one place makes the most sense to me. I really like the idea of showing each item and total quantity, then clicking it to drop down all the different batches/details. Could have a toggle to expand/close all, and the option to show/hide items with 0 stock.

Agree that it's currently not ideal explaining to users why we need to use different buttons for (mostly) the same thing... People do find this a point of confusion. Sounds like this would be a really good opportunity to consolidate them into one function :)

adamdewey commented 1 year ago

Wait, we basically have this functionality already in the Inbound Shipments!!

This is exactly the kind of thing that would be great to have in the Stock page:

image

image

image

An easy interim win would then be to deep-link from that item name to the item details page?

GaryWilletts commented 1 year ago

Sounds like a good idea to me and the only solution you really need. @adamdewey how is a deep-link different to a link? Btw, I think we need to use deep-link ™️ ©️ ®️ in our brochures.

adamdewey commented 1 year ago

@GaryWilletts - haha, it's not really different I just like the way it sounds.

I think deep-linking is more when you're connecting specific parts of an app (rather than a link to a separate website or something)

E.g. a deep-link from the stock page could link you to the item page but with a filter activated for the specific item you were looking at (and probably open that item details pane too).

richardmoizeau commented 1 year ago

Hey everyone, just adding in my two cents here... Consolidating the inventory information into one place makes the most sense to me. I really like the idea of showing each item and total quantity, then clicking it to drop down all the different batches/details. Could have a toggle to expand/close all, and the option to show/hide items with 0 stock.

Agree that it's currently not ideal explaining to users why we need to use different buttons for (mostly) the same thing... People do find this a point of confusion. Sounds like this would be a really good opportunity to consolidate them into one function :)

Wait, we basically have this functionality already in the Inbound Shipments!!

  1. you cannot edit a (shipment) line individually, you always edit all the lines for one item at once (see below). For stock view, we would need to make all lines (item and stock lines) clickable and potentially with a different behaviour.

Screen Shot 2023-02-08 at 8 55 46 AM

  1. when there is one line for an item in a I/S, we show all the details (Acetylsalicylic in below screenshot), when more than 1 line, it displays multiple (Paracetamol). We would have to change that if we have a different behaviour between the item line (opens the item detailed view) and the stock line (stock lines details modal). There should always one parent line even there is only one stock line.

Screen Shot 2023-02-08 at 9 16 20 AM

from item detailed view to stock view: : in my wildest dreams you could 1. click on the Available Stock chart and 2. it would open the stock view already filtered by this item.

  1. Screen Shot 2023-02-08 at 9 02 34 AM

  2. Screen Shot 2023-02-08 at 9 03 44 AM

from stock view to item detailed view:

We could make the item code (or name) clickable to automatically open the item detailed view.

Screen Shot 2023-02-08 at 9 05 15 AM

when list is 'grouped by item', we could click on the "item line' and it would open the item view.

adamdewey commented 1 year ago
  • I'm still not sure about showing item with 0 stock though. If we have 2 views (list of stock lines and the 'group by item' view), how the items with 0 stock will appear in the list of stock lines ?

I think here you just wouldn't show items with 0 stock?

Unless you're thinking to get rid of the separate item page, in that case you could have a 2nd toggle for 'Show items with 0 stock'

  • there a few things that would be an issue with the way the 'group by item' functionality works for IS, OS and stock take:
  1. you cannot edit a (shipment) line individually, you always edit all the lines for one item at once (see below). For stock view, we would need to make all lines (item and stock lines) clickable and potentially with a different behaviour.

Yes I was also thinking different behaviour depending if you click on an item line or a stock line.

  1. when there is one line for an item in a I/S, we show all the details (Acetylsalicyclic in below screenshot)), when more than 1 line, it displays multiple (Paracetamol). We would have to change that if we have a different behaviour between the item line (opens the item detailed view) and the stock line (stock lines details modal)

I think we could change it so that the column headers change to something that makes more sense when the 'Group by item' is toggled? The expandable stock lines have their own separate column headers, so no need to keep e.g. 'Batch' in the item columns when they're grouped?

  • Regarding (deep)links:

from item detailed view to stock view: : in my wildest dreams you could 1. click on the Available Stock chart and 2. it would open the stock view already filtered by this item.

from stock view to item detailed view:

We could make the item code (or name) clickable to automatically open the item detailed view.

when list is 'grouped by item', we could click on the "item line' and it would open the item view.

Yes, this is exactly what I envisage too :)

richardmoizeau commented 1 year ago

I think here you just wouldn't show items with 0 stock?

I agree - we don't want to see items with 0 stock in 'View Stock' :-) If it's not there, there is no stock.

Unless you're thinking to get rid of the separate item page, in that case you could have a 2nd toggle for 'Show items with 0 stock'

No I think we should keep 2 separate lists. I have the impression that the discussion is now more about 'how to enhance Stock View ?' and no longer about 'should we combine both list or not ?'