Details
-
Story
-
Status: Closed (View Workflow)
-
P3
-
Resolution: Done
-
None
-
None
-
-
ACQ Sprint 55, ACQ Sprint 56
-
2
-
Thunderjet
Description
Requirement:
In case a request that contains an empty po_lines array, all the PO Lines should be removed... e.g. per the "if the po_line exists in the database but not in the request, remove the po_line" rule.
Current situation:
The resulting CompositePurchaseOrder.java model generated based on composite_purchase_order.json schema has
@JsonProperty("po_lines") @JsonPropertyDescription("a list of completely de-referenced purchase order lines") @Valid private List<PoLine> poLines = new ArrayList<PoLine>();
This means that if request does not include po_lines or includes "po_lines": [] the result is the same i.e. empty List.
Required change:
The schema change is required to make these 2 cases different:
... "po_lines": { "description": "a list of completely de-referenced purchase order lines", "id": "po_lines", "type": "array", "items": { "type": "object", "$ref": "composite_po_line.json" }, "default": null }, ...
In this case if the request does not include po_lines or includes "po_lines": null the result will be absolutely the same i.e. "do not touch PO lines". The business logic should start processing the PO lines only if the field is not null.
TestRail: Results
Attachments
Issue Links
- relates to
-
MODORDERS-94 Improve PUT orders/id endpoint to not remove PO Lines
-
- Closed
-
-
UXPROD-1388 Create New Purchase Order Lines
-
- Closed
-