Background: When program is not supported by user's home facility, it will still appear in the StockManagement screens and a user will see the following error messages when attempting to issue, receive or make adjustments for program that is not supported:
Programs that are not supported by the facility should not be displayed in Stock Management screens
Steps to reproduce:
1. Login as administrator
2. Navigate to the Stock Management -> Adjustments, Stock Management -> Issue, Stock Management -> Receive view.
3. Try to make adjustments/issue/receive for not supported program
The StockManagement screens should only display programs that BOTH:
user has rights for
are supported by the facility they refer to
Fix toString method for Program, inspect what API call could result in such error (3), it happened only once for me
/api/physicalInventories and /api/stockCardSummaries call /users/userId/hasRight with params: user home facility and all user programs from /api/users/programs. The API need to be made consistent , return true for /users/userId/hasRight even if program is not supported or return with /api/users/programs only programs that are supported for home facility. Might use cached permission strings instead of API calls.
They cover all problems I reported originally.
Okay, all 3 tickets look good to me. I did ask one question in OLMIS-4088, so I left that one as Roadmap while waiting for answers. But I've changed this one and from Roadmap to ToDo because they are ready for work.
this seems to duplicate the OLMIS-4089.
OK, I'll check whether this issue still occurs as soon as I finish other tasks.
I checked whether the issue still occurs when I was testing - it doesn't, so I'll move this ticket to Dead.