All Sub-tasks Resolved Condition

Use the All sub-tasks must be resolved built-in condition to stop/hide a transition in a parent issue until all sub-tasks are set to a chosen resolution. For example, you can use this script to make sure a parent task cannot be transitioned to the Done status until all sub-tasks have a resolution of Done.

It is important to remember that a resolution is different from a status. The resolution is typically automatically set using a post function when an issue is transitioned to a specific status. For example, when you transition an issue to the Done status, the resolution typically updates to Done with a pre-generated post function. 

For this condition to work, you must ensure the Resolution automatically sets to the required state using a post function. This post function is usually pre-generated in most workflows; see the Jira Knowledge Base article on Resolutions for more information. 

Use this condition

  1. Go to Administration > Issues > Workflows.
  2. Select Edit on the workflow you want to add a condition to. 
  3. Select the transition to which you wish to add a condition.
  4. Under Options, select Conditions.
    Image highlighting the Conditions option
  5. On the Transition page, select Add condition.
  6. Select All sub-tasks must be resolved [ScriptRunner].
    Image showing All sub-tasks must be resolved selected
  7. Select Add.
  8. Optional: Enter a note that describes the condition.
  9. Select a resolution. This is the resolution you wish sub-tasks to have before the parent issue is permitted to transition. 
  10. Select Preview to see an overview of the change. 
  11. Select Update.
    Image showing Update being selected

  12. Select Publish and choose if you want to save a backup copy of the workflow.
    Image showing the Publish button being highlighted

    You can now test to see if this workflow condition works.

Additional example

If you would like to be more specific about which sub-tasks must be resolved before a parent transition is permitted, you can use a simple scripted condition. For example, check out the Conditions tutorial page for an example where All QA sub-tasks must be resolved.



Related content

On this page