Automation For Jira - Writing a rule that updates a parent issue (Initiative) based on an update made to its Child issue (Epic)

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

The purpose of this article is to show how to configure a rule meant to update a parent issue (such as a field update, or transition to a new status) when its child issue is updated, in the case the parent/child relationship is based on the hierarchy level configuration, which is a feature from Advanced Roadmap, and which is dictated by the Parent Link field.

It is important to note that the Parent/Child relationship is different from the Parent/Sub-Task relationship which is documented in configuring sub-tasks. The Rule Branches can only be used to search for the Parent of a sub-task, or the Epic a Story is linked to. However, the Rule Branches don't have an option to search for the Parent of an issue when the parent/child relationship is based on Hierarchy Levels.

Implementing such a use case can be a bit tricky, which is why this KB article was written.

Solution

For this solution, we will provide an automation rule that will copy the Priority field of a child issue (Epic) into its parent issue (Initiative) when this field is updated.

We will also assume that the parent/child relationship is configured as below:

  • The hierarchy levels are configured so that the Initiative issue type is a parent of the Epic issue type:

    Hierarchy levels
  • With such hierarchy-level configuration, we will have the Parent/Child relationship described in the examples below:

    • The issue SCRUM-55 is a parent issue of the issue SCRUM-25 (as shown in the Child Issues panel):

      Child issues are shown in the below image
  • The issue SCRUM-25 is a child issue of the issue SCRUM-55 (as configured via the Parent Link issue):

    Screenshot showing Parent link

Rule configuration

The automation rule will be configured like this:

  • Add the Field Value Change trigger

    • Fields to monitor for changes: Priority

  • Add an Issue fields condition with the following settings:

    • Field: Issue type

    • Condition: Equal

    • Value: Epic

  • Add a Branch rule component with the following settings:

    • Un-tick the option Only include issues that have changed since the last time this rule executed

    • Type of related issues: JQL

    • JQL: use the JQL query below:

      1 key in parentIssuesOf("{{triggerIssue.key}}")
  • Inside the Branch rule component, add the Edit Issue action with the following settings:

    • Choose Field to Set...

      • Select "Priority"

      • Select "Copy from trigger issue"

The automation rule will look like this:

Automation screenshot

Updated on June 7, 2024

Still need help?

The Atlassian Community is here for you.