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

Still need help?

The Atlassian Community is here for you.

Ask the community

robotsnoindex

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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, 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 the Parent of an issue when the parent/child relationship is based on Hierarchy Levels.

This is the reason why implementing such use case can be a bit tricky, which is why this KB article was written.

Environment

  • Jira Server/Data Center on any version from 8.0.0 (Or Jira Service Management from 4.0.0)
  • Automation For Jira on any version from 7.4.0

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:
  • 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):
    • The issue SCRUM-25 is a child issue of the issue SCRUM-55 (as configured via the Parent Link field):

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:
    • (warning) 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:

      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:



Last modified on Jun 27, 2024

Was this helpful?

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