As a storeroom manager, I want to get notifications for when my facility has stocked out of a product in my program(s) so I can take decisions (such as making an emergency requisition or an ad-hoc issue) to ensure consistent supply of the product at the facility.
*Stockout notification for a product is sent to the defined recipient when Stock on Hand = 0
Recipient #1 is the user with "Edit stock inventories" right for the facility/program
Recipient #2 is the user at the next level up who oversees that facility's stock levels. ( do you know what I can call this person / what the exact permissions are here? We want the facility store manager's boss to get this notification too.)
Notification shows Product Name, lot information, days of stockout, and Minimum quantity (MinStock) following the template below ( should we also include an ISA here or something? What amount do we want the person to emergency reorder in case of stockout?)
When the user receives a notification, there are two links that they can click on to take action to either view bin card or order more stock.
Clicking on the first link takes them to view the bin card for the stocked out product.
Clicking on the second link takes them to an emergency requisition form pre-selected with the facility and program that has no stock
The Initiate a Requisition page will have the specific Facility type, Facility, Program, and Requisition type selected and pre-searched for that stocked out product
The pre-selected Facility type and Facility should be the facility of the stocked out product
The Program should be the Program associated with that stocked out product
The Requisition type should be Emergency.
The Initiate a Requisition page should show the search results from a search conducted with these field inputs. (Should show the list with any draft or pending requisitions from this facility & program or the initiate new requisition button.)
Email body text appears as follows:
– START –
Subject: STOCKOUT Action Required: <Facility name>, <Orderable name>
This email is informing you that there is 0 stock on hand for <Orderable Name + Lot information> in <program name> at <facility name> as of <date it went to that level>. As of today, this product has been stocked out for <number of days of stockout = today's date - date SOH went to 0>. The minimum level for <orderable name> is <MinStock>.
Please login to view the bin card and take immediate action.
View bin card for <orderable name>: <URL to View BIN CARD>
Initiate emergency requisition for this product: <url link to Initiate Requisition page>
– END –
Example URL for BIN CARD: https://test.openlmis.org/#!/stockmanagement/stockCardSummaries/72d4f0c6-a10e-49ae-bb47-d21a52147064?facility=e6799d64-d10d-4011-b8c2-0e4d4a3f65ce&program=10845cb9-d365-4aaa-badd-b4fa39c6a26a&supervised=false
Not in Scope
*if a user does not have an email, no notification is sent
*snoozing of notifications
*pre-population of product and amount to be ordered into emergency requisition form
If stock on hand reaches 0, notification gets sent out. (SOH is equal to or less than Min Stock level.)
Notification goes to people who are managing that stock (User has that facility as their Home Facility AND they have to have that stock's program rights)
No stock notification goes to same person and to supplier? or next level supervisor?
To ask: When there's no stock, who do we notify? Open question
I checked, and everything works correctly.
please add a test case for this ticket, please add steps for the showcase
1. create user with "Edit stock inventories" right for some facility and program
2. make stock adjustments for any product for that facility and program so SOH is 0
3. show mail and links (to initiate requisition and stock card) that are part o the mail
acceptance criteria speak of two recipient types, show that it works for both types. Would be good to show, that if there are more then 1 user of each type (Recipient #1 & Recipient #2). You should also show that nothing gets sent out if SOH > 0. Would be also good to show that nothing breaks for user that doesn't have an email.
There is no Recipent #2 at this point ( and comments). For the rest (no notification for SOH>0 and nothing breaks if no mail provided), I will show this.