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

How to link multiple issues created in a jira automation to each other

Marco Brundel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 1, 2021

With an Automation for Jira rule, 3 new issues are created when creating 1 specific issue.

These 3 issues are linked to the trigger issue.

But now I also want the 3 issues to be linked to each other.

 

How do I get this done?

Regards, Marco

2 answers

1 accepted

2 votes
Answer accepted
John
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 7, 2021

Hey @Marco Brundel 

This sounds easy but is a little complicated. I found one way to do it, someone else might be able to suggest a simpler way.

The rule needs to run sequentially so using branches isn't possible, we also need to refetch the trigger issue a few times.

Here's the rule and I'll explain some of it below.

Screen Shot 2021-10-08 at 9.06.11 am.png

  • Rule triggers when an issue is created (add a condition after the trigger if you only want it to trigger for certain issue create scenarios)
  • Create issue
  • Link issue - Set the second select to "Most recently created issue". This links the recently created issue with the trigger issue.
  • Re-fetch issue data - Now the rule can see the new issue link
  • Create issue - important in the choose filed to set dropdown add "linked issues". Use the ... button to switch to "Copy from" and set the linked issue to "Copy linked issue from trigger issue"
  • Link issue - Same as the previous one
  • Re-fetch issue data
  • Create issue - again copy the linked issue field from trigger issue
  • Link issue to most recently created

The trick is once you create an issue link to refetch the issue so that you can then copy that link in the next issue you create. So issue 2 and 3 copy the existing issue links from the previous actions.

I'd also suggest using relates to as your link type. I didn't try with other link types because they have an inbound / outbound version (e.g. Blocks and Blocked by).

Hope that helps!

- John

Marco Brundel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 8, 2021

Hi @John ,

Thank you. You just gave me the right tip and now I have the rule working. Only with the 1st create I don't do a create action. Thanks again.

Regards, Marco

 

Screenshot 2021-10-08 at 09.14.30.png

William Tanner October 20, 2021

My situation is very similar but slightly different.  I create an issue (manually), and then use automation to create 3 tasks.

Task 1: child of manually created issue.

Task 2: child of manually created issue and blocked by Task 1.

Task 3: also child of manually created issue and blocked by Task 1.

 

Even though I use the "Re-fetch issue data" function, and set the Link to the most recently created issue, the reality is Task 2 and Task 3 have links set to being Blocked by the initial trigger issue and not Task 1 like it should be.

 

Any suggestions?

 

Automation rules for child tasks and relationships.png

 

 

Here are how the links are being set.  Notice the Parent issue is blocking Tasks 2 and 3, and Tasks 2 and 3 should be blocked by Task 1.

 

Automation rules for child tasks and relationshipss.png

Like Shailesh Dhawale likes this
Per Lofgren May 30, 2024

This worked exactly how I wanted it.
Thanks for the great instructions @John 

Cheers
Per 

0 votes
Filipi Lima
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 22, 2022

Removing my answer as it did quite work as expected. I'll edit a fix if I can manage it.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events