There is no prompt to ask me close Epic when all stories are closed

Jar Lady March 31, 2024

Previously when I linked Epic, Stories and Tasks together using the Jira Automation Rule, there will be a prompt to ask me if I wish to close Epic when all the stories are done. But after I added Sub-Tasks, the prompt is no longer there. How should I configure my rule such that Epic, Stories, Tasks and Sub-Tasks are linked together and:

1) when Tasks are done, Story will be closed

2) when Stories are done, the Epic will be closed? (either by prompt or rule)

I have tried all ways to make the above work using Jira Automation Rules but didn't succeed.

Currently the Epic, Stories, Tasks and Sub-Tasks are linked via "blocks" relation and I also tag them to Epic Link.

2 answers

1 vote
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 31, 2024

Hi @Jar Lady 

Why are you using links instead of the built-in parent/child relationships? 

0 votes
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 31, 2024

Hi @Jar Lady 

Just to confirm, do you want Automation to auto-close these issues?

Could you share your current rule(s)?

---

Just to note, it's probably best to...

  • Create 2 separate rules
    • One to close the Epic based on Stories closing
    • The second to close the Stories based on Sub-tasks closing
  • Allow the rule which closes the Epic to be activated by the rule which closes the Stories. You can allow this in "Rule Details"
  • Use the official parent/child relationships, rather than linked issues - it's more definitive in Branches

Edit: Documented below how these rules might look

---

Rule 1 - Close Stories

  • Trigger: Issue Transitioned
    • To status = Done
  • Condition: Issue fields condition
    • Field = Issue Type
    • Condition = equals
    • Value = Sub-task
      • Branch: Related issues
        • Type = Parent
          • Branch-Condition: Related issues condition
            • Related issues = Sub-tasks
            • Condition = All match specified JQL
            • Matching JQL - status = Done
          • Branch-Action: Transition issue
            • Destination Status = Done

---

Rule 2 - Close Epic

  • Trigger: Issue Transitioned
    • To status = Done
  • Condition: Issue fields condition
    • Field = Issue Type
    • Condition = is not one of
    • Value = Epic, Sub-task
      • Branch: Related issues
        • Type = Epic (parent)
          • Branch-Condition: Related issues condition
            • Related issues = Stories (or other issues in this Epic)
            • Condition = All match specified JQL
            • Matching JQL - status = Done
          • Branch-Action: Transition issue
            • Destination Status = Done
  • Rule Details...
    • Check to allow other rule actions to trigger this rule = TRUE (check box)

---

Notes:

  • You might need additional rules if additional Sub-tasks and/or Stories could be added once a parent is closed. These rules would reopen the parent issues.

---

Let us know if these work!

Ste

Jar Lady March 31, 2024

I need to use linked issues because all the tasks underneath the Story are linked in sequential manner.

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 1, 2024

Hi @Jar Lady 

Can you specify how...

  • Epic is linked to Story (Epic Link or Link Type)
  • Story is linked to Task(s)
  • Tasks are linked together

...?

Also are these "Tasks" direct Sub-tasks of the Story? Or is there another layer added inbetween via linked issues as "Tasks"?

Ste

Like LynnG likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.20.10
TAGS
AUG Leaders

Atlassian Community Events