Automation rule to reopen/close the Epic if a belonging Story gets reopened/closed accordingly

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

An Automation rule is to be created to reopen an Epic if the Epic has a Story linked to it and it gets reopened.

This article describes how to create an Automation Rule using the add-on Automation For Jira (for Jira Server/Data Center) to:

  •  reopen an Epic if the Epic has a Story linked to it and it gets reopened.
  •  closes an Epic when all stories and other linked issues are Done/closed

Diagnosis

The automation rule needs to be configured as shown below in the screenshot:


You can find more details about each block below:

  • WHEN
    • Issue transitioned: Epic
  • Branch rule / related issues   

    • Type of related issues: Epic (parent)
  • If: matches (you need to add a new if/else block, with an "Advanced compare condition")
    • First value:

      Stories (or other issues in this Epic)
    • Condition: All match specified JQL
    • Second value: project = "TEST" AND status in (closed, Done, completed, resolved)

NOTE: Here the project name and the status should be changed according to your project and instance as the status names and project names might vary.

  • Add a Branch rule / related issues inside the IF block:
    • Type of related Issues: Epic (parent)
  • THEN (to place inside the branch rule)
    • Transition issue: Done

  • Else if (this is the else block that goes with the "If: matches" block)
  • Add a Branch rule / related issues inside the ELSE block:
    • Type of related Issues: Epic (parent)
  • THEN (to place inside the branch rule)
    • Transition issue: In Progress

Known issues:

We might see some errors in the audit logs if we create the automation rule the same as the above because the workflow transitions might vary for each issue type and each project.

Example: An error stating No transitions to be specified status could be found for issue (with current status) 

Solution

Please follow the KB for Transition an issue with automation and please make sure the statuses that we provide in the Action block i.e. Transition issue is relevant for the issue type that we are updating using the automation rule.



Last modified on Dec 4, 2023

Was this helpful?

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