Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Summary

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:

Table plus
border0
heading0
multiplefalse
enableHeadingAttributesfalse
columnAttributesstyle="border:0;width=5%;",style="border:0;width=65%;",style="border:0;width=30%;max-width=30% !important;"
idsteps_table
enableSortingfalse
enableHighlightingfalse


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


Image Added

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.

Image Added


Image Modified

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 create the sub-tasks 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
1
  1. 2 field.
  2. Enter "0" in the Regular expression pattern field.
  3. Select Exact matching condition, so we only transition the parent issue to be done when all the subtasks are done.
  4. Click the Add button to save your configuration.

Image Added


Image Modified

Step 4

  1. Ensure to publish your workflow. It is always recommended to save a backup of the previous workflow when prompted.
  • Create an issue of type "Story".
  • Validate that the new sub-task issues were created and that it contains the name prepended before the parent summary
    1. Navigate to an issue with sub-task issues that is not done.
    2. Complete all the sub-task issues as done
    3. Validate if the parent issue is also moved to done status.