Forums

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

Help with Jira Automation for Linking Related Issues

Ravi Chand
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 16, 2025

 

 

Hi Team,

I’m trying to set up an automation rule in Jira to streamline the linking of related tickets. Here's what I want to achieve:

  • If Ticket A is referenced by Ticket B and Ticket C , all related tickets should automatically link to each other (i.e., B references A and C). 
    • C reference A & B
  • This will help us keep track of all related issues more effectively.

  • In real cases, if Ticket A is referencing Ticket B & C. Then when you open ticket B, it only shows ticket A; the same case for ticket C as well.

Could you guide me through creating such an automation? If you have any examples or suggestions, I’d appreciate it!

Thanks,
Ravi Chand

1 answer

0 votes
Trudy Claspill
Community Champion
January 16, 2025

Hello @Ravi Chand 

Welcome to the Atlassian community.

Are you using Jira Data Center or Jira Cloud? If Jira DC, what version.

What action do you want to use to trigger the rule to create the additional links?

Does it matter what link types already exist? 

What type of link type do you want to use in the new link you create?

Ravi Chand
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 16, 2025
  • Jira Platform:

    • I am using Jira Cloud.
  • Trigger for Rule:

    • I want the rule to be triggered when I add a linked issue to an existing ticket. Specifically, I would like to use the "Linked Issue" field with the link type "relates to" and specify the related ticket name.
Trudy Claspill
Community Champion
January 17, 2025

Have you tried to build this automation? Show us what you have so far?

If you are new to Automation Rule you can find free, on-demand training at https://university.atlassian.com

 

The basic structure would be:

TRIGGER: Issue Linked
In this trigger you can specify the type of link you care about. If you only care about a new issue link be created with the "relates to" link (versus, for example, the "depends on" link), then you can specify that in this trigger.

The Issue Linked trigger is unique in that it involves two issues. One issue is considered the trigger issue and the other is considered the "destination" issue. 

If you linked are view ABC-1 and from there create a "relates to" link to ABC-2, then ABC-2 is considered the trigger issue and ABC-1 is considered the "destination" issue. For the next step we have to get all the issue linked to ABC-2 (the trigger issue) so we can link those to ABC-1. We'll use a branch so that we can then take action against each issue found.

FOR EACH: Branch rule/Related Issue
Select the Linked Issues option.
Select the "relates to" Link Type
The tells the rule to get all the issues that are linked to ABC-2 with the "relates to" link.

The next step is to link ABC-1 to all the issues you just found linked to ABC-2. You would do that with Link Issues action:

ACTION: Link Issues
"relates to" {{destinationIssue.key}}

The value in the curly braces is a Smart Value. It is a special smart value available because of the Issue Linked trigger. You'll have to type that in to the box that displays "Trigger issue".

 

Screenshot 2025-01-17 at 2.33.28 PM.png

Suggest an answer

Log in or Sign up to answer