Done
Pinned fields
Click on the next to a field label to start pinning.
Details
Details
Assignee
Sebastian Brudziński
Sebastian BrudzińskiReporter
Paweł Gesek
Paweł GesekTime tracking
3d 7h 30m logged
Components
Sprint
None
Fix versions
Priority
Time Assistant
Time Assistant
Created August 25, 2016 at 4:25 PM
Updated October 20, 2016 at 10:47 PM
Resolved October 20, 2016 at 11:20 AM
Currently the submit endpoints do a save & submit - we should consider if for simplification purposes, we want to redo it into a submit endpoint that just takes the requisition ID. The same is true for the approve/authorize steps. We want to change the approve API to not take the whole object. This should leave us with one update endpoint and a series of endpoints that only change statuses.
Updating a requisition would take the entire requisition (including its line items). That endpoint should use logic in the domain layer to be smart about making updates. Depending on the status it is in, only certain fields are allowed to change.
(A good example here would be a requisition.updateFrom method that takes as an argument a non-persisted requisition object, which checks if this requisition can be updated from the non-persisted object. It would make different checks based on the current status of the requisition.)
As discussed in https://docs.google.com/document/d/1jlG9mmlts9K8lAXCpOuuxhkost1agOVqxCOx9oxJJHk/edit (see Approving a Requisition section)
Acceptance criteria:
Submit, authorize and approve endpoints do not take a requisition object as the request body.
Those endpoints only transition the requisition to a different status (and do any logic related to that). The caller cannot update any fields directly through these endpoints.