How do I set my automation trigger to initiate when the Epic Link issue field is changed?

Zachary Martin
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!
June 4, 2018

I am trying to automate some of the linking I do with tickets using the tool, Automation for Jira. The goal for my automation rule is for a user to edit the Epic Link field on a ticket and then it will automatically add a parent/child link between the Epic and the Story or Task.

 

Here is the flow of my current build but I am having issue with choosing the right trigger. I would like it to trigger the rule when the issue field "Epic Link" has been edited. I have found a workaround but it seems really inefficient and has the possibility to not run in certain situations.
Workaround flow.PNG

 

 

4 answers

1 accepted

0 votes
Answer accepted
John McKiernan
Atlassian Partner
June 5, 2018

Hi Zachary,

Thanks for raising this. This is a known Jira bug, unfortunately so the workaround is necessary.

You can see the details here:

https://codebarrel.atlassian.net/browse/AUT-334 (you may need to view incognito)

Once we can get to this, we'll pop you an email to let you know that it has been fixed! 

Cheers,
John

Zachary Martin
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!
June 5, 2018

Thank you John for the reply! I have also added myself as a watcher to the ticket: JSWSERVER-12299.

John McKiernan
Atlassian Partner
June 5, 2018

Sounds good Zachary! Enjoy your day :) 

ad0861
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!
June 29, 2018

@John McKiernan1I don't think the issue link you provided is related to our issue. THe issue link Zachary provided https://jira.atlassian.com/browse/JSWSERVER-12299 is the issue we need resolved. It is coming up on 3 years with no resolution. What's the ETA on this? Please increase the priority of this issue.

John McKiernan
Atlassian Partner
July 1, 2018

Hey Alexander, 

the issue I shared with Zachary is how we, at Automation for Jira, are tracking the Jira bug (https://jira.atlassian.com/browse/JSWSERVER-12299). We do this so we can inform our impacted customers once Atlassian fixes the Jira bug. 

Unfortunately, as a marketplace add-on, we don't have any sway over how Atlassian prioritize their issues - as much as we'd like to :)

Cheers,

John 

Like Siavash Parsa likes this
Cloudstek
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!
August 21, 2019

The https://codebarrel.atlassian.net/browse/AUT-334 issue is marked as "done", however the functionality is still not there due to the bug.

In the comments of the server bug I noticed a comment:

As kind of a workaround, it does fire IssueLinkCreatedEvent and IssueLinkDeletedEvent with hidden link type named "Epic-Story Link".

I wonder if that has been tried yet. The comment makes sense to me as it is a link that's being created. This could then easily be solved in the existing "Issue Linked" trigger by adding this link type.

Like Steven Wang likes this
John McKiernan
Atlassian Partner
August 21, 2019

Hey Maarten, 

thanks for your message. You are quite right, it is marked as 'done' whereas it should probably be marked as 'can't do'

It is totally reliant on Atlassian fixing that bug (open since 2015 and in the long term backlog) and we have to try to keep our own backlog clean. 

With the workaround you mention, this might work but to be honest, it isn't something we could swear to as it changes so much. Apologies about this. When it comes to issues within our control, we can be more definite but I don't like to recommend workarounds that rely on something other than Automation for Jira. 

I hope you understand.

Cheers,

John  

3 votes
Matt C. Wilson
Contributor
April 2, 2022

For anyone coming here looking for a way to do updates to Epics when an Epic Link is changed on a ticket, you can start with this guidance: https://codebarrel.atlassian.net/browse/AUT-1264?focusedCommentId=107261

Basically, you have to use Issue Updated (or Multiple Issue Events) as the trigger, and then look at the special {{changelog}} smart value to see if it was an Epic Link change.

Some how-to: https://community.atlassian.com/t5/Jira-Software-questions/Jira-Automation-How-to-identify-what-Epic-a-Story-was-linked-to/qaq-p/1924599

0 votes
Vaibhav Revankar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 6, 2023

Hi @Zachary Martin ,

Instead of using a JQL, I believe you can also use the below technique as a workaround which is efficient than JQL

Screenshot 2023-07-07 at 1.21.47 AM.png

 

This checks if the "Epic Link" does not equal "EMPTY". If its true, then you can add a "Re-fetch" and then branch into the "Standard Issue Types" parent or basically do the other operations like Editing the fields by copy the values from the new "Epic" to its "Story" level child to keep them in sync and so on.

I hope this helps.

0 votes
CCI
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!
November 6, 2019

As of Jira 8.5.0, Atlassian has fixed https://jira.atlassian.com/browse/JSWSERVER-12299.

I've been able to successfully set up a rule that monitors when the Epic Link changes, however there is no smart value that can be used for the issues link.

I'm trying to accomplish a couple things:

  1. Add a comment to the Epic to track when issues are linked/removed from the Epic. This works when an Epic Link is added, but not removed. Once the epic link is removed, I can't use the "For Epic (parent)" branch condition because there is no longer a parent.
  2. Send a notification email with details on the issue changed and what the Epic Link is.
marcspringett
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!
August 12, 2021

Did you have any luck with this? I'm trying to update an Epic that a Story has been 'removed from', when it has been removed.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events