No products on Stock Management screens for freshly-configured facilities

Hi all,

During configuration of our covid-ref instance it came out that there are no products on Physical Inventory screen to add to a new facility even though the products were loaded, assigned to a program and facility type. As a workaround it is possible to create a requisition with available products at first. After approving it (so sending a stock event) the products are added to Physical Inventory screen and other Stock Management screens.

It is hard to imagine using this workaround for hundreds of facilities during configuring new instances for COVID project.
Adding all products available in the system for the program should be enabled at least on the Physical Inventory screen.

Our idea is to start working on this logic in Core as soon as possible and make a patch release. I have already created the proper ticket:

Do you have any objections to the proposed idea?

In other words, you can issue, receive, and conduct physical inventory only, if the stock card for the given facility and product already exists. It seems that this should not be the case and whether the product can be managed via Stock Management or not should be dictated by FTAPs.

Does anyone know of any reason why Stock Mgmt might require Stock cards before we begin working there? Was it always designed this way? If not, let’s move forward with this fix.


I certainly don’t recall it being designed this way, and rather this feels like a regression.

I found a couple links for reference:

  • Physical Inventory original user stories, mentions approved lists, active products (those with stock cards) and inactive products (those without stock cards apparently - odd term to use).
  • Forum post from June 2019, I wonder if in the course of making things faster we lost original logic. Maybe, maybe not. Would need to bisect the history to figure it out. I’ll do a simple test, start an older ref-distro release, and see what happens.

Since we apparently need to fix this regression, can we be certain while fixing it to make this functionality clear by writing an automated test for it (aside: we don’t have an existing manual regression test for this?) @Paulina_Buzderewicz?

I also found the following would reproduce the issue:

  1. Goto
  2. Login as administrator
  3. Goto Administration->Products
  4. Create some test product
  5. Add that product to the Program Family Planning (as full supply) and to an FTAP for Health Clinics
  6. Goto Stock Management->Physical Inventory
  7. Create a new phys. inv. for Family Planning (delete it if it already exists) at Comfort Health Clinic.
  8. Check to see if new product is in the inventory (it should be)

Followup: this certainly was a regression between OpenLMIS Ref Distro v3.6.0 and 3.7.0. In the earlier version it wasn’t possible to add products easily, however you can still see the change between the versions by:

  1. Start v3.6.0
  2. Login as administrator
  3. Go to Stock Management -> Physical Inventory
  4. Create a new one for Family Planning
  5. Click Add Product button
  6. In the drop-down notice a dozen or so products available.

If you ran the same steps above, but use v3.7.0, you’ll notice the dozen available products shrink from a dozen, down to one: Levora.

Comparing 3.7 to 3.6 it looks like Stock Management bumped from v4.1.0 to v5.0.0, and the CHANGELOG has a number of issues which look like good candidates for introducing the regression.

That’s as much detective work I can do, hopefully it’s useful.

Given the info above, let’s prioritize fixing this and consider having a patch release with the fix. It will be very frustrating when we start deploying it to new countries for hundreds of facilities and several products and creating stock cards manually for them.


1 Like