Describe the bug
We make a PATCH request to update the period of a GroundWork (today around 8:55). The Request we make is:
PATCH to ../groundworks/8698557
body:
{"items":[{"key":"Period","value":{"start":"2021-02-08T00:00Z","end":"2021-04-30T00:00Z","duration":null}},{"key":"EstimatedDurationDays","value":82}]}
This fails with the following response message:
{"type":"https://httpstatuses.com/400","title":"One or more validation errors occurred.","status":400,"detail":"Please refer to the errors property for additional details.","errors":[{"type":"urn:be.vlaanderen.gipod.errors:InvalidGroundworkPeriodAndEstimatedDurationCombinationException","title":"Groundwork period GroundworkPeriod: {\"Start\":\"2021-02-08T00:00:00Z\",\"End\":\"2021-04-30T00:00:00Z\",\"Duration\":null} is invalid in combination with estimated duration estimatedDuration: {\"Days\":82}.\n ","detail":"Groundwork period GroundworkPeriod: {\"Start\":\"2021-02-08T00:00:00Z\",\"End\":\"2021-04-30T00:00:00Z\",\"Duration\":null} is invalid in combination with estimated duration estimatedDuration: {\"Days\":82}.\n "}]}
Expected behavior
The response that this GW was modified.
Additional context
We did make a similar call today (around 13:02):
PATCH .../groundworks/9179442
body:
{"items":[{"key":"Period","value":{"start":"2021-02-08T00:00Z","end":"2021-02-10T00:00Z","duration":null}},{"key":"EstimatedDurationDays","value":2}]}
This call was successfull
Describe the bug We make a PATCH request to update the period of a GroundWork (today around 8:55). The Request we make is: PATCH to ../groundworks/8698557 body: {"items":[{"key":"Period","value":{"start":"2021-02-08T00:00Z","end":"2021-04-30T00:00Z","duration":null}},{"key":"EstimatedDurationDays","value":82}]}
This fails with the following response message: {"type":"https://httpstatuses.com/400","title":"One or more validation errors occurred.","status":400,"detail":"Please refer to the errors property for additional details.","errors":[{"type":"urn:be.vlaanderen.gipod.errors:InvalidGroundworkPeriodAndEstimatedDurationCombinationException","title":"Groundwork period GroundworkPeriod: {\"Start\":\"2021-02-08T00:00:00Z\",\"End\":\"2021-04-30T00:00:00Z\",\"Duration\":null} is invalid in combination with estimated duration estimatedDuration: {\"Days\":82}.\n ","detail":"Groundwork period GroundworkPeriod: {\"Start\":\"2021-02-08T00:00:00Z\",\"End\":\"2021-04-30T00:00:00Z\",\"Duration\":null} is invalid in combination with estimated duration estimatedDuration: {\"Days\":82}.\n "}]}
Expected behavior The response that this GW was modified.
Additional context We did make a similar call today (around 13:02): PATCH .../groundworks/9179442 body: {"items":[{"key":"Period","value":{"start":"2021-02-08T00:00Z","end":"2021-02-10T00:00Z","duration":null}},{"key":"EstimatedDurationDays","value":2}]} This call was successfull