Error when converting requisition

Description

Reproduction steps:
1. Log into the application as divo1.
2. Initiate emergency requisition for Dep--Sito Distrital Cuamba.
3. Submit -> Authorize.
4. Log into the application as administrator and add Warehouse Clerk role for Mozambique Central Warehouse to a rivo.
5. Log into the application as a rivo.
6. Try convert requisition to order.

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at org.openlmis.fulfillment.service.OrderService.setOrderStatus(OrderService.java:273)
at org.openlmis.fulfillment.service.OrderService.save(OrderService.java:200)
at org.openlmis.fulfillment.service.OrderService.createOrder(OrderService.java:146)

In general it was impossible to convert a requisition to an order when supplying facility does not support a program (missing entry in facility.supportedProgram list) for which the requisition has been created.

Environment

None

Assignee

Łukasz Lewczyński

Reporter

Klaudia Pałkowska

Labels

Story Points

1

Time tracking

12h

Epic Link

Components

Sprint

None

Fix versions

Priority

Major
Configure