Done
Pinned fields
Click on the next to a field label to start pinning.
Details
Assignee
Sebastian Brudziński
Sebastian BrudzińskiReporter
Przemysław Studziński
Przemysław StudzińskiStory Points
5
Original estimate
3d
Time tracking
Sprint
Add sprint
Fix versions
Priority
Time Assistant
Created January 19, 2017 at 3:12 PM
Updated February 8, 2017 at 5:02 PM
Resolved February 7, 2017 at 2:29 PM
Some DELETE endpoints don't work. When I try to delete an entity, I get 500 error - when an entity is associated with other entity. (example: Facility include GeographicZone) because of the data integrity violation.
We have decided to take the following actions in the services:
Requisition service - perform manual validation while deleting requisition template, to make sure that no requisition is using it. Deleting is only possible if no requisition that uses this template exists.
Reference data service - keep all the delete endpoints as they are, but make a note in RAML to use them with care and that they completely remove the instance. The constraints that we have placed on the entities protect them from being removed if they are used - this will cause 500 error, but we are OK with that for 3.0.
Fulfillment service - perform manual validation while deleting order, to make sure that no Proof of Delivery has been created yet and linked with that order. Delete is only possible if no PoD is linked with an Order.
Acceptance criteria:
The RAML in referencedata is updated for all DELETE endpoints there and advises against the usage of the endpoints / warns about the implications. They can and should (for now) return 500 if there's a required association existing with other instance.
No DELETE endpoint in the requisition service returns 500
No DELETE endpoint in the fulfillment service returns 500
Deleting requisition template verifies whether it is used by a requisition and if it is, returns a correct error message
Deleting order verifies whether it is used by a proof of delivery and if it is, returns a correct error message