Versions Compared

Key

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

Scenario

Div
classtime

Image Modified Estimated Time: 10 min

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

Image Removed
Image Added

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 Removed


Image Added
Image Removed

Image Added

Step 2

Within the Issue Fields screen:

  1. Select

the 
  1. the Detailed Fields

 tab
  1.  tab.

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

  3. Enter Done in

the 
  1. the Transition

 field
  1.  field.

Image Removed
Image Added
Image Removed

Image Added

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 
  1. the Condition 1

 field
  1.  field.

  2. Enter "Done" in

the 
  1. the Regular expression pattern

 field
  1.  field.

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

  2. Scroll down until you

find 
  1. find JQL query field.

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

  3. Enter "%jql_result_count%" in

the 
  1. the Condition 2

 field
  1.  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 
  1. the Add

 button
  1.  button to save your configuration.

Image Removed
Image Added
Image Removed

Image Added

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.