Physical Inventory UI offline displays drafts/programs that cannot be worked on offline

Description

While testing physical inventory offline, I noticed that I can see all programs, not just drafts. After clicking the "Start" or “Continue” button I get an internal error.

Reproduction steps:

  1. Log in as administrator and go to Stock Management > Physical inventory.

  2. Click the start button next to one program.

  3. Clean the local storage and log in again as administrator.

  4. Go to Stock Management > Physical inventory.

  5. Go offline.

  6. Click the Continue button next to draft.

  7. An internal error occurs.

  8. Click the Start button next to second program.

  9. An internal error occurs.

Expected results:

  • A program that hasn't draft should not be visible.

  • If draft is visible on UI it should also be in local storage.

NOTE: When the user is on the list of physical inventory and goes from offline to online, the page doesn't update and one cannot see other programs, need to refresh the view - I think that this should be improved.

Environment

None

Activity

Show:
Joanna Szymańska
September 16, 2020, 2:26 PM
Edited

After testing I noticed below issues:

  1. The program that is not a draft still shows incorrectly in the offline mode:

Reproduction steps:

  1. Log in as administrator and go to Stock Management > Physical Inventory.

  2. Click the “Start” button next to any program.

  3. Go offline.

  4. Go to Stock Management > Physical Inventory.

Joanna Szymańska
September 16, 2020, 3:32 PM


2. After going offline to online, the second program is not visible on the list:

Reproduction steps:

  1. Make a draft for Family Planning program.

  2. Go back to Stock Management > Physical Inventory.

  3. Go offline.

  4. Click the Continue button next to FP program.

  5. Go online.

  6. Go back to Stock Management > Physical Inventory.

  7. Second program (Essential Meds) isn’t visible on the list.

Joanna Szymańska
September 16, 2020, 3:51 PM
Edited

(Not applicable)3. After clearing local storage, the drafts are not visible offline:

Reproduction steps:

  1. Make drafts for two programs.

  2. Clean the local storage and log in again as an administrator.

  3. Go back to Stock Management > Physical Inventory.

  4. Two drafts are visible.

  5. Go offline.

  6. Drafts are no longer visible.

     

NOTE: This is correct behavior. Even if a user sees drafts on the list but hasn't opened them earlier, they have not been saved to local storage. So when it goes offline while on the draft list, the drafts are not visible.

Joanna Szymańska
September 16, 2020, 3:57 PM
Edited

4. I get an error when I stop loading a draft and try to open it again or sometimes the page loads indefinitely:

Reproduction steps:

  1. Log in as an administrator.

  2. Go to Stock Management > Physical Inventory.

  3. Click the Start button next to the Essential Meds program and go offline immediately.

  4. The EM program is no longer on the list.

  5. Go online and click the Continue button next to the same program.

  6. An error occurs or the page just loads indefinitely.

NOTE: The error has been noticed on perftest, but it hasn’t occur on uat.

Update: The issue no longer occurs.

Joanna Szymańska
September 17, 2020, 10:49 AM

Tested with success.

All the above issues has been fixed.

Assignee

Aleksandra Sołtys

Reporter

Joanna Szymańska

Labels

None

Story Points

2

Time tracking

12h

Epic Link

Components

Sprint

None

Fix versions

Affects versions

Priority

Major
Configure