4teamwork / opengever.core

OneGov GEVER core package
11 stars 5 forks source link

Allow to close a disposition without any dossiers #8049

Closed elioschmutz closed 1 week ago

elioschmutz commented 2 weeks ago

A user can create disposition by selecting dossiers in the dossier listing.

As soon as the disposition is created, each dossier will be turned into a new review state called: "offered". A user is now able to edit the disposition and remove dossiers which will trigger another workflow transition on dossiers to release them again.

A dossier which is already part of a disposition cannot be added to another disposition.

Currently, we have the following restrictions:

This is bad for the following situation: A user creates a disposition "Disposition A" with "Dossier A" and realized that it was a bad selection. There is already an existing disposition "Disposition B". There is no option to abort this process. The dossier cannot be used for "Disposition B" because it is already part of "Disposition A". Removing it from "Disposition A" is not possible because the user would need to find another dossier that the list of dossiers is not empty for "Disposition A". Removing the disposition is also not possible.

Implementing the functionality to remove disposition would be a lot of work. We'd need to extend the workflow and would need to add some logic for releasing the connected dossiers again. The delete-permissions in gever are also very strict. So we would need some custom implementation as we did it for repositories.

That's why I decided to just allow an empty list of dossiers which seems to be a really quick fix for the main issue. By allowing an empty list, a user could now just remove the "Dossier A" and the "Disposition A" can be closed without any dossiers.

https://github.com/user-attachments/assets/d69245bc-7f17-4a03-bbd9-9412416841a3

For TI-942

Checklist

Everything has to be done/checked. Checked but not present means the author deemed it unnecessary.