Flagged
Done
Pinned fields
Click on the next to a field label to start pinning.
Details
Details
Assignee
Sebastian Brudziński
Sebastian BrudzińskiReporter
Joanna Bebak
Joanna Bebak(Deactivated)Labels
Story Points
2
Original estimate
3d
Time tracking
Components
Sprint
Add sprint
Priority
Time Assistant
Time Assistant
Created November 2, 2017 at 12:57 PM
Updated April 5, 2018 at 12:23 AM
Resolved March 23, 2018 at 8:57 AM
I noticed issues when I was executing the https://openlmis.atlassian.net/browse/OLMIS-3050#icft=OLMIS-3050 test case:
Both requisitions are returned on Postman even when only one of them should be returned (steps 4, 5) or when none should be returned (step 7).
Repro steps:
1. GET /api/requisitions/requisitionsForConvert?filterValue=Essential Meds&filterBy=programName
2. Requisitons for Family Planning are in response
Root cause:
If the facilityName filter is not provided, then all facilities are fetched and database search ignore programName filter (RequisitionRepositoryImpl line 403). OR should probably be changed to AND. or RequisitonService line 787 should change.
Acceptance Criteria
GET /api/requisitions/requisitionsForConvert should allow you to filter both ways:
Filtering by "programName" should work correctly and only show requisitions from that program. (Currently this does not work.)
Filtering by "facilityName" or "facilityCode" should work correctly and only show requisitions from that facility. (Currently this does not work.)
Filtering by "all" should apply both filters at once, only returning requisitions for the given program and or the given facility. (Currently this works, but make sure it will works still.) If you provide value that does not match any facility nor program, it should return nothing. (Currently this does not work.)
Update the Zephyr Test if this fix changes that: https://openlmis.atlassian.net/browse/OLMIS-3050
Post a comparison of the before and after API response times (we want to make sure that fixing this bug does not make the end-points really slow. We do not want to un-do the optimizations that were done in https://openlmis.atlassian.net/browse/MW-534#icft=MW-534 to improve speed.)
Test in UI whether searching in Convert Requisitions to Order is working now (see https://openlmis.atlassian.net/browse/OLMIS-4144#icft=OLMIS-4144 for a screenshot). If there are separate UI issues, please file a UI bug for that. (Fifth comment below suggests there may be separate UI issues.)