openfoodfoundation / openfoodnetwork

Connect suppliers, distributors and consumers to trade local produce.
https://www.openfoodnetwork.org
GNU Affero General Public License v3.0
1.1k stars 712 forks source link

[Inventory] Products missing from Inventory #12679

Closed BethanOFN closed 1 month ago

BethanOFN commented 1 month ago

Description

User raised that certain products were missing from their inventory - they were not showing in Hidden, New or Inventory products.

Expected Behavior

If an enterprise is using the inventory, all products should appear in one of: Hidden, New or Inventory lists.

Actual Behaviour

Not all products are displayed.

Steps to Reproduce

  1. See product in Products list:

    Screenshot 2024-07-16 at 15 29 46
  2. Go to inventory for Cambridge Food Hub (id: 201177)

  3. Search for 'Grapes, White (seeded) - Spain (organic)' (product id: 303049) or 'Apricots, Spain (organic)' (product id:360652)

  4. Observe that no matching product is found in either Inventory, Hidden or New

Animated Gif/Screenshot

Missing apricots 1

Workaround

No workaround - customers unable to use inventory fully.

Severity

bug-s2 for us, bug-s1 for the user (they are unable to manage their full inventory, which they need to manage products)

Your Environment

Possible Fix

rioug commented 1 month ago

I think that's an issue with how the inventory page is designed. On this page, product are loaded in the background, so if you happen to search for a product that hasn't been loaded yet you won't find it. That can be a problem for shops with lots of products (or a super admin user). I am fairly confident if the customer were to stay on the inventory page, the product will eventually show up.

There is also this issue with the ordering and duplicate data : https://github.com/openfoodfoundation/openfoodnetwork/issues/12670 , so it's possible the loading of product is slowed down by the duplicate data, or even the latest product refactor changes. For know I am going to fix #12670 and we'll see if it addresses the issue.

BethanOFN commented 1 month ago

@rioug Slow loading was my first thought - however I tried it with one of my other test accounts (not super admin, just a couple of hubs) and left it to load for over an hour and still nothing. I don't think it's related to loading speed

rioug commented 1 month ago

That's good to know. Let's see if the product sorting fix the issue first, and I'll revisit this issue if it doesn't

rioug commented 1 month ago

@BethanOFN the fix for https://github.com/openfoodfoundation/openfoodnetwork/issues/12670 has been released today, could you check if you are still missing products ?

BethanOFN commented 1 month ago

@rioug user has confirmed all back to normal 🎉 thank you!

RachL commented 1 month ago

oh yeah!

closing 🥳