Update new / edited statusses when editing workflow


On the workflow edit page, when you add a new status or edit an editing one the statusses in the "Transitions" box are not updated.

A JQuery script needs to be created to update the "Transitions" select as well. (currently you need to save the workflow first, before you can use the transitions).

Deployment actions


Technical tasks



Roy Frans
December 8, 2015, 12:54 PM

A new PR has been added with an updated solution. It contains only changes for this issue and

Reviewer is Marijn

Roy Frans
November 16, 2015, 2:21 PM
Jan Sanne Mulder
November 2, 2015, 11:18 AM

I just noted some things that should not be done in general, as I dont accept the sollution. The server round trip is not required. The form type has been setup so that the transitions value is the same as the index number of the state in the form. So everything can be done is javascript on the client side and no server round trip is required.

Roy Frans
September 21, 2015, 2:44 PM

This is not going to be as simple as implementing a jqueryscript that retrieves the transitions from the db again.

The biggest problem is that states are added using a boottsrap_collection formtype.
This means that any new states are not actually added to the db until the save button is pressed.
Reloading the form will remove the newly added state from the form instead of adding it to the transition selects.

The alternative is to write js code to manually keep stuff up to date.
It will be hell to keep all states and transitions ordered and synchronized correctly without introducing any weird bugs.

Another alternative is to save and reload the form when an edit has been made. It will be necessary to trigger this save and reload on every edit to prevent weird bugs. This also means that the form secretly gets saved without the user knowing it.






Fix versions