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

Set Epic Link based on issue being created and linked automation

Kelly McAteer May 2, 2023

I haven't found anything similar to my use case so hopefully my question is clear!

I have installed a third party add-on called QAlity Plus to create and link tests to Jira tasks. What I would like to do is create an automation based on the following:

  1. User creates a task in Jira.
  2. Once they have created their task, they create a Test (this is configured as a custom standard issue type).
  3. Once the Test is created, an Automation is triggered that will set the Epic Link of the Test to the same Epic that the Task is associated with (setting the custom field Epic Link).

Important information:

  • when the Test is created, it links to the issue through a custom "is tested by/tests" link.
  • Test to issue is always a 1:1 link. However a single issue can have many tests (n:1).

I'm sure this could be achieved through simple automation, but when I look at my audit logs the trigger issue is the created Test. Which isn't an issue until I try to get the Epic Link of the "tests" which I can't figure out how to get.

I've added a ss of my audit log because I've been continuously tweaking my trigger conditions and I'm getting the same result. Any ideas on how I can achieve the above? Thank you!

Automation_-_Jira 0205.png

1 answer

1 accepted

1 vote
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 2, 2023

Hi @Kelly McAteer - Your rule would look something like this:

  • TRIGGER: Issue Linked (Is Tested By/Tests)
  • ACTION: Edit Issue (Epic LInk)
    • {{destinationIssue.Epic Link}}

How this works...  In the Issue Linked trigger, you get the following information:

Rule executes when an issue is linked to another issue. {{issue}} will always refer to the source issue, so if ISSUE-A is blocked by ISSUE-B, this rule will execute on ISSUE-B. To access ISSUE-A, use {{destinationIssue}}, and to access the link type, use {{linkType}} (e.g. {{linkType}}

In your case, you would substitute blocked by for is tested by where your Task would take the role of {{destinationIssue}} and your Test would take the role of {{issue}}.  So, as you pointed out, the rule executes against the Test, so you just need to make a call on the {{destinationIssue}} to pull information from the Test.

Kelly McAteer May 4, 2023

This worked for me thank you!

 

This is the JSON I got working in the end to update the Epic Link for anyone who is wondering

 

{
"fields": {
"Epic Link": "{{destinationIssue.Epic Link}}"
}
}
Like Mark Segall likes this
SKellam October 25, 2023

@Kelly McAteer  @Mark Segall  I am struggling with this problem as well - when I tried the above JSON, I am getting an error on using "fields". Any clues? Only difference in scenario is I am using Xray testing, but still has auto linking when test issue is created through tests/is tested by. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, team '25, conference, certifications, bootcamps, training experience, anaheim ca,

Want to make the most of Team ‘25?

Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.

Learn more
AUG Leaders

Upcoming Jira Events