Synchronize parent and sub-tasks issues

Automation for Jira Server solves thousands of use cases but synching parents and sub-tasks is probably the most common.

Typically if your ‘parent’ issue transitions to ‘done’, you will want the sub-tasks to obediently follow them. Using our related issues branch, this is simple.

  • Use an Issue Transitioned Trigger (can be to a status of your choice or simply any transition).
  • Now we can ‘branch’ the rule to work on related issues. In this case, we will work on sub-tasks but it could just as easily be linked issues, epic, or something you set using JQL.
  • On this branch, choose the transition issue action. By default, it will copy the status of the trigger issue but you can choose whatever you like here.
  • You could include a condition such as the Issue Fields Condition to refine the rule a little further.

What else can we sync in Jira?

  • Stories (in Epics)
  • Linked issues
  • Created issues (issues created by other actions previously in the rule)
  • JQL (simply search for related issues with JQL)
  • Epic (the parent of a story)
  • Parent (the parent issue of a sub-task)
  • Issues fixed in version
  • Issues fixed in sprint

You can then use all of the same conditions and actions you’re used to, to perform tasks with the related issues!

Sample use cases

  • Copying field values from the parent issue to its sub-tasks
  • Update all stories in an Epic when the Epic changes
  • Transition-related issues when a parent issue is transitioned
  • Update the parent issue when a sub-task is updated
  • Comment on linked issues when an issue is resolved.

Smarter smart-values!

{{issue.parent.fields.some field}} or {{issue.epic.fields.another field}}

For components in a related issues branch, you can always access the issue that originally triggered the automation rule via {{triggerIssue}}, so you can access {{triggerIssue.fields.assignee.displayName}} for example.

Smart values can now also be used anywhere you use JQL (so you can search for “parent = {{issue.key}}”) and you no longer need to lookup custom fields by ID! The following two smart-values are now equivalent:

{{issue.fields.customfield_10023}} and {{issue.fields.My Awesome Field}}

One more thing

Update on related issues condition*

Last modified on Mar 30, 2020

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.