Create Order as Copy of Existing Order.
Description¶
The user selects an order from the list of orders and requests a copy of it. The system makes a complete copy of the order with the following changes:
- History is not copied but starts fresh at the time of the copy.
- Attachments to Kanban Cards, if any, are not copied.
- Associations with Items of each
PoLineare reset. If the Item the line refers to has been deleted, the line is considered invalid and the PO cannot be approved or submitted until the line is either edited or deleted.
After the Copy has been made, the user can edit the Order as in the previous cases.
Requirement¶
Document the desired behavior for duplicating an existing order, while clarifying current implementation status.
Preconditions¶
- Not implemented. There is no service in
operations/src/main/kotlin/cards/arda/operations/procurement/orders/servicethat clones an existing order. The only entry points today handle blank orders, orders from items, and orders from cards.
Scenario Overview¶
- Callers that need copy semantics must orchestrate the process manually (e.g., read an order through
OrderRecordService.getParentChild, adjust payloads, then re-submit usingOrderRecordService.add). - A dedicated helper or service method should be introduced before enabling this capability in the product.
PostConditions¶
- Until a copy utility exists, the system will not create new orders automatically from existing ones.
Creation of Order Lines¶
- No automated line duplication is available.
Changes to Order Header¶
- None. The copy workflow is pending implementation.