while looking at the statuses in our requisitions and filling the testing gap for them, I fixed https://openlmis.atlassian.net/browse/OLMIS-2795 . The problem was that the fulfillment service mirrors the statuses from requisitions in this enum (https://github.com/OpenLMIS/openlmis-fulfillment/blob/master/src/main/java/org/openlmis/fulfillment/domain/ExternalStatus.java) which was not updated when Malawi introduced the REJECTED status.
I fixed this for now by simply adding the status, but isn’t this the kind of tight coupling between services we want to avoid? Fulfillment services use the list of status changes from requisitions primarily to generate the order pdf with information such as authorizer, date authorized etc.
A fairly simple way to improve this would be to change this field to a string in the fulfillment service and ignore unrecognized status changes, this wouldn’t require API changes and would drop this dependency. The other method would require changing the API to not expect a status change dump from requisitions, only the info we need (perhaps we want to keep storing all the status change history with an order as well?).
Do you think we should get rid of this dependency? If yes, with which approach?
Technical Project Manager firstname.lastname@example.org / +48 690 020 875