Move parent issue to done when all sub-tasks are done

Move parent issue to done when all sub-tasks are done

Scenario

When all the sub-tasks are completed, you would like to automatically move the parent issue to be in done status only if it's not done.

Steps

The following steps demonstrate how to configure Create on Transition's Update issues post function, using the transition feature along with JQL query and regex inspection:

Step 1

As a Jira Administrator or Workflow Administrator:

  1. Navigate to your workflow.

  2. Edit your workflow to create a draft version.

  3. Select Done (31) transition

  4. Select the Post Functions tab.

  5. Click Add post function

  6. Select Update issues (Bob Swift) post function and add

 

Step 2

Within the Issue Fields screen:

  1. Select the Detailed Fields tab.

  2. Select only "Parent issue key" in the Issues to update field

  3. Enter Done in the Transition field.

Step 3

Define the JQL query that needs to be used in conjunction with regex to inspect the number of issues that are not in the Done status.

  1. Select the Conditions & Configuration tab.

  2. Enter "%parent_status%" in the Condition 1 field.

  3. Enter "Done" in the Regular expression pattern field.

  4. Select Negative matching condition, so we only update the parent issue when the parent issue's story is not "Done".

  5. Scroll down until you find JQL query field.

  6. Enter "parent = %parent_key% and status != Done" in the JQL query field

  7. Enter "%jql_result_count%" in the Condition 2 field.

  8. Enter "0" in the Regular expression pattern field.

  9. Select Exact matching condition, so we only transition the parent issue to be done when all the subtasks are done.

  10. Click the Add button to save your configuration.

Step 4

  1. Ensure to publish your workflow. It is always recommended to save a backup of the previous workflow when prompted.

  2. Navigate to an issue with sub-task issues that is not done.

  3. Complete all the sub-task issues as done

  4. Validate if the parent issue is also moved to done status.

 

 

Need support? Create a request with our support team.

Copyright © 2005 - 2025 Appfire | All rights reserved.