Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Inserting a new level in a hierarchy and using automation to maintain relationships


I needed to add a new level above Epic into an existing hierarchy. So the hierarchy would change from

Initiative - Milestone - Epic


Initiative - Milestone - Feature - Epic

The challenge was to do this without orphaning the Epics and losing the relationships with their parent Milestones (which will become their grandparents), and without a lot of manual work. I didn't find any solutions in the documentation or Q&A so I'm writing up what I did as it might be helpful to other people. 

I used automation rules with the scheduled trigger but ran them once and then disabled them. Automation is very useful for running one-off rules.

Step 1

First I needed to identify the Milestones which have Epic children. I ran a 'scheduled' rule with JQL looking for relevant Milestones, It did a lookup of issuetype = Epic AND "Parent Link" = {{issue.key}} then if {{lookupIssues.size}} does not equal 0, it added a label 'hasEpics'. 

Step 2

Then I added the new Feature issuetype into the project and into the hierarchy at the Epic level.

Step 3

Then I used another scheduled rule (run once and disable) to create a placeholder Feature ticket for each Milestone which has the label hasEpics. I gave them the summary Feature for: {{issue.summary}} and in the 'more options' section included this:

"fields": {
"customfield_12700": "{{issue.key}}"

customfield_12700 is id of Parent Link in my site, I believe it is different in different sites. 

Step 4

Then I ran a rule to put the key of the placeholder Features into a short text field on their sibling Epics. It could be any short text field, I used 'Supplier Name'. So it was a scheduled (one-off) rule again, on JQL looking for all Features. Then branch on JQL 

issuetype = Epic AND "Parent Link" = "{{}}"

And in the branch, edit Supplier Name with {{triggerIssue.key}}

Step 5

Then I changed the hierarchy, creating the new level, taking Feature issuetype out of the Epic level and adding it to the new Feature level.

Step 6

Then I needed to run a rule on all Epics whose 'Supplier Name' is not empty, and edit them to put the key that was in Supplier Name into the Parent Link:

"fields": {
"customfield_12700": "{{issue.Supplier Name}}"

So the Epics are now children of the placeholder Features and grandchildren of their original Milestones.

 Then just a bit of cleanup to wipe the Supplier Name field on the Epics. And make sure that all those one-off rules are disabled!



Log in or Sign up to comment
AUG Leaders

Atlassian Community Events