Can't open user roles view after removing home facility and keeping roles

Description

While test regression I found out that if user has supervision roles related with home facility, the home facility would be removed from the user and we chose option to keep old roles, it will not be possible to open roles screen. There is only error message to check console log:

Internal application error
Please check console logs for more information.

Bug description:

  • If a role is invalid, the admin user cannot access the roles page to view.

Expected Behavior:

  • If a role is made invalid, the admin user should be able to view the roles page and see correctly assigned roles, as well as roles that are not active (invalid) so they can make necessary changes (Scenarios that would cause a role to become invalid should be listed in this ticket and supported - such as a facility that is not active, a home facility that is not assigned to the user, and other edge cases)

  • If home facility is removed, then the admin user should still be able to view the roles assigned

  • The home facility roles that are assigned should be flagged in the roles table because they are not valid if a home facility is not assigned

  • Update test case with expected behavior

Environment

None

Assignee

Łukasz Lewczyński

Reporter

Łukasz Lewczyński

Story Points

3

Time tracking

24h

Epic Link

Components

Sprint

None

Affects versions

Priority

Major
Configure