Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create Automation, change status child issue

Mario Quercia November 22, 2023

Hello how are you?

I am wanting to create a rule that changes the state of the parent initiative, when the epics (which are as secondary issues) change state.

The parent issue is initiative and has N epics associated with it.

How can I make this rule?

1 answer

1 accepted

0 votes
Answer accepted
Ste Wright
Community Champion
November 22, 2023

Hi @Mario Quercia 

This should work, at a simple level (i.e one Epic is transitioned):

  • Trigger: Issue Transitioned
    • To Status = In Progress
  • Condition: Issue Fields Condition
    • Field = Issue Type
    • Condition = equals
    • Value = Epic
  • Branch: Related Issues
    • Type = Parent
      • Branch-Action: Transition Issue
        • Destination Status = In Progress

^ You could then edit the Statuses and the Conditions to match your specific needs :)

Ste

Mario Quercia November 22, 2023

Thank you very much for your answer.

If I need to validate that the initiative has N epics associated with it (as children) and that it validates certain states, it doesn't work for me.

I need if the epic is moved to Canceled or Done and the initiative has all its associated epics in (cancelled or done) go to Done, otherwise In Progress.

Mario Quercia November 22, 2023

Captura de pantalla 2023-11-22 a la(s) 09.59.47.png

Ste Wright
Community Champion
November 22, 2023

Hi @Mario Quercia 

There's a few different variations here:

  1. All Epics are in Done
  2. All Epics are in Canceled
  3. Epics are in a mix of Done and Canceled
  4. Some Epics are not in either Status

You'll need to decide how to treat (3) - for the below example, I've assumed if at least one Epic is "Done", then the Initiative should be Done.

---

This should work:

  • Trigger: Issue Transitioned
    • To Status = Done, Canceled
  • Condition: Issue Fields Condition
    • Field = Issue Type
    • Condition = equals
    • Value = Epic
  • (1) Branch: Related Issues (Type = Parent)
    • Branch-Condition: Related Issues Condition
      • Related Issues = JQL
        • Related Issues JQL - issuetype = Epic and "Parent Link" = {{issue.key}}
      • All match specific JQL
        • Matching JQL - status = Done
    • Branch-Action: Transition Issue
      • Destination status = Done
  • (2) Branch: Related Issues (Type = Parent)
    • Branch-Condition: Related Issues Condition
      • Related Issues = JQL
        • Related Issues JQL - issuetype = Epic and "Parent Link" = {{issue.key}}
      • All match specific JQL
        • Matching JQL - status = Canceled
    • Branch-Action: Transition Issue
      • Destination Status = Canceled
  • (3) Branch: Related Issues (Type = Parent)
    • Branch-Condition: Related Issues Condition
      • Related Issues = JQL
        • Related Issues JQL - issuetype = Epic and "Parent Link" = {{issue.key}}
      • Some match specific JQL
        • Matching JQL - status = Done
    • Branch-Condition: Related Issues Condition
      • Related Issues = JQL
        • Related Issues JQL - issuetype = Epic and "Parent Link" = {{issue.key}}
      • Some match specific JQL
        • Matching JQL - status = Canceled
    • Branch-Condition: Related Issues Condition
      • Related Issues = JQL
        • Related Issues JQL - issuetype = Epic and "Parent Link" = {{issue.key}}
      • None match specific JQL
        • Matching JQL - status not in (Done, Canceled)
    • Branch-Action: Transition Issue
      • Destination Status = Done
  • (4) Branch: Related Issues (Type = Parent)
    • Branch-Condition: Related Issues Condition
      • Related Issues = JQL
        • Related Issues JQL - issuetype = Epic and "Parent Link" = {{issue.key}}
      • Some match specific JQL
        • Matching JQL - status not in (Done, Canceled)
    • Branch-Action: Transition Issue
      • Destination Status = In Progress

---

Let us know if this works for you!

Ste

Mario Quercia November 22, 2023

thank you so much

It is not working, because it does not enter the parent incident, which is the initiative.

the schema is Initiative as parent and has epics linked as child issues

Mario Quercia November 22, 2023

is there any other alternative?

Ste Wright
Community Champion
November 22, 2023

Hi @Mario Quercia 

Just in case it wasn't clear above, the Related Issues type for each Branch needs to be set to Parent, so the Branch is actioned against the Initiative and not the Epic(s).

I've included that above so it's clearer!

Ste

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events