stable
Clone or download
Part of story #12187 configure workflow pre & post actions at target state level How to test: - Forge your DB and set "is_advanced = 0" to a workflow. It will set it in "simple mode". Given the "To do" value for the workflow, and you have created at least one transition on it (one arrow in the UI) When you run PATCH /tracker_workflow_transitions/{id} on any transition for that column "To do" (any transition to the "To do" value) - when there's only one transition, it updates it with pre-conditions - when there's more than one transition, it updates them all with the same pre-conditions. - Transitions from "New Artifact" are updated but ignore "comment mandatory" pre-condition. Will be done later: - Applying post-actions on sibling transitions (it's a separate route) Change-Id: I57610a5c7726bf8652f91edde3667fb28bfdb579
Modified Files
Name | ||||
---|---|---|---|---|
A | plugins/tracker/include/REST/v1/Workflow/TransitionPatcher.php | +95 | −0 | Go to diff View file |
M | plugins/tracker/include/REST/v1/Workflow/TransitionsResource.class.php | +13 | −20 | Go to diff View file |
A | plugins/tracker/include/Workflow/Transition/NoSiblingTransitionException.php | +25 | −0 | Go to diff View file |
M | plugins/tracker/include/Workflow/Transition/TransitionUpdater.php | +1 | −1 | Go to diff View file |
A | plugins/tracker/include/Workflow/Transition/Update/TransitionCollection.php | +42 | −0 | Go to diff View file |
A | plugins/tracker/include/Workflow/Transition/Update/TransitionRetriever.php | +64 | −0 | Go to diff View file |
M | plugins/tracker/include/Workflow/Workflow_TransitionDao.class.php | +21 | −2 | Go to diff View file |
A | plugins/tracker/phpunit/REST/v1/Workflow/TransitionPatcherTest.php | +168 | −0 | Go to diff View file |
M | tests/phpunit/phpunit.xml | +2 | −0 | Go to diff View file |