Conditions Activities
Script Condition - All Sub-Tasks Must be Resolved
This script condition makes sure that all sub-tasks associated with an issue have a resolution set before allowing the next transition.
First, access the workflow you need to edit. You can access workflows from the Jira Administration menu, or directly from a project.
Enter the workflow’s edit mode. In our example, we’re editing the Virtual Tour Server Management project workflow.
Click the transition you need to add a condition to, and then click Conditions. For our example, we click Upgrade, in between the In Progress and Upgraded statuses.
Add the ScriptRunner scripted condition All sub-tasks must be resolved.
Make sure to set the Resolution for the sub-tasks in this process.
When you are finished, you should see the script condition added to the list of conditions associated with the transition. In our example, you can see that we successfully added the All sub-tasks must be resolved script condition.
Before you move on from working with this script condition or test, make sure to Publish your workflow.
Once you have published, test your script condition by trying to resolve an issue with sub-tasks that uses that workflow. You should not even see the option. Then complete the sub-tasks, and you should be able to resolve the issue.