Versions Compared

Key

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

This is the documentation for JSU for Jira Cloud. If you are using JSU on Jira Server/Data Center, see our JSU Server/Data Center documentation.

...

Goal

Eliminate repetitive tasks and save time by automatically closing parent tasks

Scenario

When your team has closed all of an issue’s subtasks, the parent issue remains open and someone has to manually move it to

Status
colourGreen
titledone
. Let’s look at how this common task can be automated with JSU.

Components

Linked Transition post function

How to configure this rule

  1. Create a draft of your project workflow. If you're unsure how to get to this page, follow the onboarding steps in Edit a Jira Workflow. You can then view your workflow in Text or Diagram mode. The steps in this use case represent Diagram mode. If you haven't already, switch the workflow viewer to Diagram mode.

...

  1. Screenshot of the Jira workflow editor in Diagram mode.Image Added

  2. We want to close parent issues when their subtasks are done, so we need to add the rule specifically to when issues transition to the 

    Status
    colourGreen
    titleDONE
     status. Click the arrow that points to this status to show the transition rule options menu.

  3. We want to add a post function to this transition that runs an automation after the issue has been transitioned to the target status. Select Post Functions from the options list to display the Post Functions tab.

...

  1. Screenshot of the Jira workflow editor showing post functions highlighted in the transition options menu.Image Added

  2. Select Add post function to view all available post functions.

  3. Select the Linked Transition (JSU) post function, and then click Add at the bottom of the page.

  4. We want the parent to automatically close when the last subtask is closed, so we select Parent/Sub-task > The parent of the subtask(s).

  5. Next, we define the workflow and transition

...

  1. we want to apply to the selected parent issue

...

  1. . We want to keep this rule simple, so we only want this rule to apply to issues in our JSU project.
    We select the workflow

...

  1. for our JSU project and the Done transition. Any parent issues will be transitioned to 

    Status
    colourGreen
    titleDONE
     as part of the rule we're configuring.

    Example configuration of the Linked Transition post function.Image Modified

  2. We only want the parent to be transitioned to 

    Status
    colourGreen
    titleDONE
     if ALL of its subtasks are also 
    Status
    colourGreen
    titleDONE
    . We set the conditional status to
    Status
    colourGreen
    titledone
    .

  3. The remaining fields are optional. All of these fields are described in detail in the Linked Transition post function page

...

  1. .

  2. Now you're ready to save your new post function. Select Add at the bottom of the page.

  3. You can now see a summary of all your post functions applied to this transition. To confirm this new workflow and test it out, you need to publish it. At the top of the page, select Publish Draft. You can choose to save a backup if required before confirming.

Test the post function in the workflow

Now, we can test the post function in action!.

  1. Go to an open issue that includes one or more open subtasks.

    Example Jira issue with multiple subtasks in the To Do status.Image Modified

  2. Transition all of the subtasks to 

    Status
    colourGreen
    titledone
    .

    Example Jira issue with multiple subtasks that have been moved to the Done status.Image Modified

  3. Refresh/reload the parent issue. You'll notice that it has now also been transitioned to 

    Status
    colourGreen
    titledone
     - which means our post function has worked as expected!

...

  1. Screenshot of an example Jira parent issue that was moved to the Done status through a JSU automation.Image Added


    Congratulations! You've just configured your very own automation

...

  1. .

...

Need more information or help? Get in touch!