Disabling a workflow just removes it from the sort order without updating the sortindex of the remaining active workflow. This leaves a gap in the sortindex, which can cause different problems: eg., you can't "move up" the workflow which was immediately below the disabled one, or "move down" the one which was above it. Or, if you now activate a new workflow, it will get the same sortindex as the previously last one…
This is the root cause of the problems reported in issue #128.
This PR adds a function to workflow_manager.php to rearrange the sortindex of the remaining workflows when disabling a workflow.
Disabling a workflow just removes it from the sort order without updating the
sortindex
of the remaining active workflow. This leaves a gap in thesortindex
, which can cause different problems: eg., you can't "move up" the workflow which was immediately below the disabled one, or "move down" the one which was above it. Or, if you now activate a new workflow, it will get the samesortindex
as the previously last one…This is the root cause of the problems reported in issue #128.
This PR adds a function to
workflow_manager.php
to rearrange thesortindex
of the remaining workflows when disabling a workflow.