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

How can I use JIRA automation to link related defects together.

When users log a Defect via the xray test execution, we have it set up to link that new defect (we are using issue type Bug) to the associated Test and User Story. If you create another defect from that same test execution, it will also link to the associate test and user story. However, the 2 defects are not linked to each other. 

Is there a way to run an automation rule that will link to two defects together? I've tried setting the trigger as when an Issue is Created and when an Issue is Linked, but it have not been successful. 

2 answers

Hi @Kendall Coleman 

What problem are you trying to solve by linking the defects to each other...when they are already linked to the source item under test (i.e. the story)?

Knowing that may help the community to suggest ideas to solve the problem.  Thanks!

Kind regards,

Hi @Bill Sheboy 

We wanted a way to holistically see everything, regardless of which issue you are viewing (Story, Test, or Bug).

So to your point, if we are looking at the Story or the Test, we will see all the Bugs created, but we aren't getting the "whole" picture per se, when we are viewing the Bug(s). 

Additionally, having the bugs linked together factors into another automation rule we want to implement. 

Thank you,


Thanks for explaining, Kendall.

I think Craig has you on a good path with their suggestion, as once the new bug is created you could use branching and perhaps JQL to go up to the story and then cross-link the bugs from the branch. 

One gotcha to watch for: applying the links in a consistent direction or duplicate links could be added between issues.

0 votes

Hi @Kendall Coleman welcome to the community.  Your answer should lay in automation branching. 
I would suggest you have a look at this
And specifically this
And one more very specific to what you are trying to achieve

Hi @Craig Nodwell ,

Thank you for the articles. However, I do not appear to have the "Issue" field under the Edit Issue action. Is this a custom field that needs to be created or a limitation of JIRA Cloud?JIRA Screenshot.png

Suggest an answer

Log in or Sign up to answer
Site Admin

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you