open-zaak / open-zaak

Open Zaak is a modern, open-source data- and services-layer to enable zaakgericht werken, a Dutch approach to case management.
Other
38 stars 36 forks source link

Cannot update the status of a zaak consecutively within the timeframe of one second #1639

Closed edgarvonk closed 2 months ago

edgarvonk commented 3 months ago

Thema / Theme

Zaken API

Omschrijving / Description

We get this error in our automated (ZAC) integration tests when quickly (within the same second) setting different statuses for a zaak:

[ErrorDetail(string='De velden zaak, datum_status_gezet moeten een unieke set zijn.', code='unique')]}

This datum_status_gezetfield in OpenZaak is in seconds. And so it seems: you cannot set multiple zaak statussen within the same second because OpenZaak requires the combination of zaak id & datum_status_gezet to be unique.

Toegevoegde waarde / Added value

This is somewhat of an problem for our automated tests because now we need to build in extra waits (of 1 second each) as a workaround which causes unnecessary delays in the test execution and this decreases our developer experience because it is important for us that automated tests run as quickly as possible. We have not seen the issue the ZAC UI itself, most likely because we cannot click this fast. ;-)

Aanvullende opmerkingen / Additional context

No response

joeribekker commented 3 months ago

Refinement: As discussed, only happens in automated testing and making it unique on ms might go against the standard (although, the unique check might even be removed completely)

joeribekker commented 2 months ago

@edgarvonk please consult with the VNG standard if this needs to be changed.