Programs not supported by the facility are displayed on Stock Management screens

Description

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:

Expected Results:
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
4. Error:

Solution:

  • 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.

Environment

None

Activity

Show:
Paweł Albecki
February 8, 2018, 10:45 AM

They cover all problems I reported originally.

Brandon Bowersox-Johnson
February 8, 2018, 11:10 PM

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.

CC

Nikodem Graczewski
May 23, 2018, 10:01 AM

this seems to duplicate the OLMIS-4089.

Joanna Bebak
May 23, 2018, 10:18 AM

OK, I'll check whether this issue still occurs as soon as I finish other tasks.

Joanna Bebak
May 23, 2018, 12:37 PM

I checked whether the issue still occurs when I was testing - it doesn't, so I'll move this ticket to Dead.

Assignee

Unassigned

Reporter

Paweł Albecki

Labels

Story Points

3

Epic Link

Components

Priority

Major
Configure