Jira Automation : Transition parent issue based on child issue summary

Jannik Endres Admin March 30, 2023

Hello everyone,

hopefully someone here can help me out. Here is what i am trying to archieve:

We got the issuetype "Initiative" created in our instance which is set above Epic in the Issue type hierarchy, meaning Epic is a child of Initiative.

The workflow of the Initiative is looking the following:

InitiativeWorkflow.png

The Epics have a simple workflow going from "Open" to "In Progress" and finally "Closed" and are all named in the summary beginning with M1, M2, M3, M4, M5. 

Now when one Epic is being transitioned to "Closed" the parent Initiative should display the "highest" Epic being closed as the status, but should not be able to be transitioned lower.

For example if the Epic M4 is being closed, then the Initiative should show M4, if afterwards M2 is being closed, the Initiative should stay at M4 because it is higher than M2.

Here is what i built and tested with several test issues and the audit log will show that the issue passes the if/else successfully, but won't do anything further as it would just stop when trying to go into the branch. (This goes all the way on to M5)

 

Automation.png

And the audit log where you can see it stops at different if / else conditions as i tried with M3 and M5 linked to the Initiative.

Any help or different solutions are appreciated.

Thanks!

2 answers

0 votes
Dondero, Suzanne June 28, 2023

I was just working on this and think I have it figured out:

  1. After you set your trigger component create a variable out of the parent initiative key
    1. Action: Create Variable
      1. Name: parent
      2. smart value: {{custom field ID}} *this is the custom field ID for your parent link on the epic, you can find this in the XML
    2. Action: Add value to Audit Log
      1. Log Message: Initiative is {{parent}}
    3. On the branch
      1. Type of related issue: JQL
      2. JQL:  key = {{parent}}

That allowed me to transition the parent initiative on a child epic, hope it works for you!

0 votes
Jeroen Poismans
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 30, 2023

Hi Jannik,

When you say this:

We got the issuetype "Initiative" created in our instance which is set above Epic in the Issue type hierarchy, meaning Epic is a child of Initiative.

What do you mean exactly? Did you do this in Plans (Advanced roadmaps)? Because Jira only has Epics as a toplevel to put issues under. Natively there is no level above that, hence Automation is not finding a parent on your Epics.

Your Epics are probably linked to the initiatives, but not by a parent - child link (the way Epics are linked to issues). In your branching you might want to use the Linked issues option to get to your linked Initiative.

 

Regards,

Jeroen

Jannik Endres Admin April 12, 2023

Hey Jeroen,

Thanks for your response!

You are correct, i did this in Advanced Roadmaps hierarchy. With this setting we are able to link Epics using the "Parent link" function provided by Jira to the Initiatives. That's why i tried using the "Parent" branch as the Initiative i try to transition is the "Child" of the Epic.

I even used the "Parent" branch instead of the "Epic (parent)" branch.

Branch.png

 Also my Epics are not "linked" to the Initiative they are shown as "Child issues" in the issue view, that's why i think linked issues won't do anything. (Please correct me if i am wrong!) 

IssueView.png

Suggest an answer

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

Atlassian Community Events