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.

  1. First, access the workflow you need to edit. You can access workflows from the Jira Administration menu, or directly from a project.

  2. Enter the workflow’s edit mode. In our example, we’re editing the Virtual Tour Server Management project workflow.

  3. 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.

  4. Add the ScriptRunner scripted condition All sub-tasks must be resolved.

    1. Make sure to set the Resolution for the sub-tasks in this process.

  5. 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.

  6. Before you move on from working with this script condition or test, make sure to Publish your workflow.

  7. 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.