Missing check if home facility supports program

Description

When user wants to display periods for given facility and program in order to initate requisition (Requisition -> Initiate), it is possible to get Internal application error message in the UI when Home facility doesn't support given Program. In this situation endpoint /periodsForInitate reponds with code 400 and the reponse body is:

{ "messageKey" : "requisition.error.facilityDoesNotSupportProgram", "message" : "Facility with ID 968f82b8-cd79-40f2-9f04-82a90fd0a16f does not support program with ID 7b462c77-2ae4-4d4e-a90d-4516a178f5de." }

Similar issue was adressed in OLMIS-2536: Missing check if facility supports programDone but it seems that it checks only supervised facilities - I got this error for user's home facility.

Acceptance criteria:

  • In the Requisition-> Initiate screen, when home facility is selected, it is possible to select only supported by this facility programs from the list.

Environment

None

QAlity Plus - Test Management

Checklists

Activity

Show:
Lucyna Laska
June 21, 2017 at 12:01 PM

Now it's okay! I retested the ticket on Chrome and Firefox

Lucyna Laska
June 21, 2017 at 10:02 AM

Sorry for not noticing that earlier. When I removed the program and then facility supported that program again, I could select that program from drop-down list but I couldn't initiate a requisition for that program. I got the message:

message : "Facility with ID e6799d64-d10d-4011-b8c2-0e4d4a3f65ce does not support program with ID dce17f2e-af3e-40ad-8e00-3496adef44c3." messageKey : "requisition.error.facilityDoesNotSupportProgram"
Lucyna Laska
June 21, 2017 at 9:26 AM

All good. Now it's only possible to select those programs which are supported by facility. When program is removed and it's no longer supported by facility, it will not be possible to select that program.

Mary Jo Kochendorfer
June 14, 2017 at 9:53 PM

, can you take a look at this during this sprint? We have it fixed for one and not the other... Again, we can wait on the VVM ticket.

Done
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Original estimate

Time tracking

1d 2h logged

Components

Sprint

None

Fix versions

Priority

Time Assistant

Created June 9, 2017 at 2:23 PM
Updated June 23, 2017 at 5:59 PM
Resolved June 21, 2017 at 12:01 PM