Autotransitioning subtasks
Required plugins
Problem
We want to autotransition substasks from `Open` status in `In progress`, if the parent task gets `In progress` state.
Solution
Adding a new function
Log in as an administrator and navigate to Administration-> Workflows and edit "Start Progress" transition on the default JIRA workflow. Press `Add` a new function:
Now add a `(k) SIL Post-function`:
The following screen appears:
Writing code
The following code (also shown above) does all the magic:
//autotransitioning subtasks in `In progress` //when parent task is trasitioned in `In progress` string sk; for (sk in subtasks(key)) { //if found subtask that has not been transfered to `In progress` if (%sk%.status=="Open") { //then execute the transition to `In Progress` state autotransition("Start Progress", sk); } }
Press the 'Save' button to save it on the server side (you can also check its syntax before, use the 'Check' button in the editor's menu).
Info
All you have to do now is to publish your workflow.
See more at Activating Workflowsection on Atlassian Documentation
See Also
See Transition View to learn how to write and edit SIL scripts.