Sudwest-Fryslan / OpenZaakBrug

Een vertaler om de bestaande applicaties, die het oude zds-standaard praten, toch met een zgw-zaaksysteem te laten werken.
European Union Public License 1.2
5 stars 7 forks source link

Updating zaak to endstatus will ensure resultaat #296

Closed MLenterman closed 2 years ago

MLenterman commented 2 years ago

Separated translation logic from the POST actions for statuses. Ensuring the presence of at least 1 resultaat needs information from the translation logic of statuses, but the resultaat needs to be present before an endstatus can be POSTed.

Added injection of a resultaat when the current action is going to close the zaak (contains a status update to the endstatus) and there is no resultaat on the zaak. It injects a resultaat with of the resultaatType from the "BeeindigZaakWanneerEinddatum" mapping.

The scenario of a zds application updating the zaak with the resultaat AFTER an endstatus has closed the zaak, should still work correctly. Resultaat only has a relation with a zaak. It is not part of a zaak and therefor the resultaat can be changed after the zaak is closed. Updating the resultaat after the zaak is closed, will replace the injected resultaat, so a dummy/incorrect resultaattype can be used to inject for this scenario.