stable

Clone or download

Read-only

Workflow actions must not be processed when workflow is not active

This fixes request #12775 Workflow post actions are executed even on disabled workflow This is also part of story #12189 prevent field modification according to state A new flag has been added to the workflow, so that current behaviour for exiting workflows does not change. All new and newly activated workflows will take into account activation state to process or not pre-condition and post-actions. The actions concern both post actions and checks done before the artifact update. How to test: - ForgeUpgrade should flag all unused workflows with post actions to legacy - When your workflow is disabled and no more legacy, with this patch post actions should no longer be executed. - When your workflow is disabled and legacy, post actions should be executed. A message is displayed in the legacy workflow view. A dedicated patch will be done for the new Workflow UI. This will also be documented in the Tuleap documentation. Change-Id: Idb4176c126c44f80fd09b8e43560b35282411f49

Modified Files

Name
M plugins/tracker/db/install.sql +1 −0 Go to diff View file
A plugins/tracker/db/mysql/updates/2019/201901211441_flag_legacy_workflows_with_actions.php +79 −0 Go to diff View file
M plugins/tracker/include/workflow/Action/Transitions/DefineWorkflow.class.php +6 −2 Go to diff View file
M plugins/tracker/include/workflow/Workflow.class.php +38 −5 Go to diff View file
M plugins/tracker/include/workflow/WorkflowFactory.class.php +3 −1 Go to diff View file
M plugins/tracker/include/workflow/WorkflowWithoutTransition.class.php +4 −2 Go to diff View file
M plugins/tracker/include/workflow/Workflow_Dao.class.php +6 −7 Go to diff View file
M plugins/tracker/site-content/fr_FR/LC_MESSAGES/tuleap-tracker.po +8 −0 Go to diff View file
M plugins/tracker/site-content/tuleap-tracker.pot +5 −0 Go to diff View file
M plugins/tracker/tests/builders/aWorkflow.php +2 −2 Go to diff View file
M plugins/tracker/tests/workflow/WorkflowFactoryTest.php +3 −1 Go to diff View file
M plugins/tracker/tests/workflow/WorkflowTest.php +122 −1 Go to diff View file