Details
-
Bug
-
Status: Closed (View Workflow)
-
P3
-
Resolution: Done
-
None
-
-
ACQ Sprint 85
-
2
-
Thunderjet
Description
Overview
An empty material types in order fails order creation even though it's not needed until the order is being opened. This mainly has implications for orders created via mod-gobi/edge-orders. In these cases, it's preferable to have the order creation succeed and the order opening fail; leaving the order in PENDING state. This should be enough to satisfy the external system placing the order.
To summarize:
- materialType should NOT be required if the order is PENDING.
- materialType should be required when opening an order.
$ curl $OKAPI/orders/composite-orders -H "X-Okapi-Token: $TOKEN" -w'\n' -H "Content-type: application/json" -XPOST -d ' { "vendor": "09c6ed1b-3984-4d9a-8f9b-e1200b68b61c", "orderType": "One-Time", "compositePoLines": [ { "titleOrPackage": "", "orderFormat": "Physical Resource", "cost": { "currency": "USD", "listUnitPrice": 10.0, "quantityPhysical": 2, "poLineEstimatedPrice": 20.0 }, "source": "User", "acquisitionMethod": "Purchase", "locations": [ { "locationId": "758258bc-ecc1-41b8-abca-f7b610822ffd", "quantity": 2, "quantityPhysical": 2 }] }] }' { "errors" : [ { "message" : "The Material Type is required but not available in PO line", "code" : "materialTypeRequired", "parameters" : [ ] } ], "total_records" : 1 }
Acceptance Criteria
- materialType should NOT be required if the order is PENDING.
- materialType should be required when opening an order.
- unit tests are updated
- api tests are updated
TestRail: Results
Attachments
Issue Links
- blocks
-
MODORDERS-370 Create MODORDERS bugfix release
-
- Closed
-
- defines
-
UXPROD-2168 Editing orders after they have been opened
-
- Closed
-
- relates to
-
MODGOBI-72 Prevent duplicate orders
-
- Closed
-