Automation on Epic Link

Frank P Moley III June 2, 2021

I need to create automation in Jira for the following scenario.

Prerequisites:

Epic exists with label

Requirements:

Story/Bug is added to Epic (Epic Link Field on issue)

Label from Epic is added to Issue

 

So far I have tried using the following:

Field Value Changed (Epic Link not listed)

Field Value Changed - Parent Link

Issue Linked - Initiative/Epic

 

None of these trigger

Where can I try next?

3 answers

1 accepted

14 votes
Answer accepted
Bill Sheboy
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.
June 3, 2021

Hi @Frank P Moley III 

Have you tried using the changelog entries to do this?  For example the following will catch when the epic link as been set to a new value.

  • Trigger: issue updated
  • Advanced compare condition:
    • First value: {{#changelog.epic link}}{{toString}}{{/}}
    • Condition: does not equal
    • Second value: empty (leave it blank)
  • Edit issue fields to make your changes from the parent

 

Best regards,

Bill

Frank P Moley III June 7, 2021

Thank you so much, this worked perfect. 

Like Bill Sheboy likes this
Tom.edwards March 8, 2022

Hi @Bill Sheboy

 

May I ask if this is possible for a specific Epic? And if it is how would one go about setting this up?

Thanks,

Tom 

Bill Sheboy
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.
March 8, 2022

Hi @Tom.edwards 

Is your use case the same as what Frank asked, and you want this only for one Epic?  

  • If so, you could add a condition to test for that specific epic's key
  • If your use case is different, would you please explain further the problem you are trying to solve?

Thanks, and kind regards,
Bill

Tom.edwards March 8, 2022

Hi @[deleted] ,

 

Thanks for the reply. I have tried the below and get emails back for all epics. But I was wanting this to be set up for just one specific epic.

Do I just specify the epic name in the second value? and change the condition to equals? I have tried this but not had any luck. 

 

  • Trigger: issue updated
  • Advanced compare condition:
    • First value: {{#changelog.epic link}}{{toString}}{{/}}
    • Condition: does not equal
    • Second value: empty (leave it blank)
  • Edit issue fields to make your changes from the parent
Tom.edwards March 8, 2022

Capture.PNG

Bill Sheboy
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.
March 9, 2022

Thanks for the information, Tom.

You want this rule to run only when the epic changes, right?  

If so, let's assume you only care if changing TO that epic.  You need two conditions in the rule:

  • trigger: issue updated
  • advanced compare condition to check the change log if the epic link changed
  • advanced compare condition to check if the epic link is your specific one
  • action: whatever actions you plan next...

Please note: This works for company-managed projects, as they use the Epic Link field to connect epics to child issues.  If this rule is for a team-managed you need a slightly different rule using the parent field.

  • trigger: issue updated
  • condition: issueType is Story, Task, or Bug
  • advanced compare condition to check the change log if the parent changed
  • advanced compare condition to check if the parent is your specific one
  • action: whatever actions you plan next...
Like Kit Friend likes this
Tom.edwards March 22, 2022

Hi Bill,

 

Thanks again for the information. Ive been having a play about with this and struggling to get this working. (I am in no doubt that this Is user error).

The two advanced compare conditions are where my lack of knowledge is hindering me and I'm not sure what the values need to be. 

  • trigger: issue updated 
  • advanced compare condition to check the change log if the epic link changed
  • advanced compare condition to check if the epic link is your specific one
  • action: whatever actions you plan next...

2022-03-22_17-32-21.png

Bill Sheboy
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.
March 22, 2022

Hi, Tom.

When using advanced compare condition to check for a field change (not covered by the built-in trigger), try using the {{changelog}} smart value.  For example to see if the Epic Link changed:

  • First value: {{#changelog.Epic Link}}{{fromString}}{{/}}
  • Condition: does not equal
  • Second value: {{#changelog.Epic Link}}{{toString}}{{/}}

Your second test should be easier as you only need to check if {{issue.Epic Link}} equals the specific issue you wanted.

Like Meelis Animägi likes this
Tom.edwards March 22, 2022

Thanks Bill,

 

I will try that tonight and let you know how I get on. 

Like Bill Sheboy likes this
Tom.edwards March 23, 2022

Hi Bill,

I just want to break down what i have for each section as I still can't get this to work, unfortunately. The image below shows each section. I wasn't sure if the issue field was correct? 

Capture.PNG

Bill Sheboy
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.
March 23, 2022

"Epic Name" is currently only a field in an Epic.  What type is the trigger issue that you are trying to use for that first comparison?

And what are you trying to test/decide in that 3rd comparison with "Engineering Results"?

Niketan Girdhar October 12, 2023

Hi @Tom.edwards ,

I was able to replicate why you need here I wasn't a rule to be fired whenever a new User story is created with an EPIC link.

PFB screenshot below.
image.png

Harsh
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.
March 1, 2024

Hi @Bill Sheboy 

Is it possible to compare Epic Link in jira data center/server?
I want to have an automation where it checks on creation that if the issue has a particular epic link then do some action?
Is it possible in data center via automation?

I have tried advanced compare using the customfield_xyz(Epic Link), it does not work.


Thank you

Bill Sheboy
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.
March 1, 2024

Hi @Harsh 

Yes, I believe that is possible...although I am not using Jira Server / Data Center to confirm it.

I recommend creating a new question, and perhaps linking back to this thread for context.  That will ensure more people see the question to offer suggestions; otherwise only those following this older thread will see it.

With your new question, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected.  Thanks!

Kind regards,
Bill

Harsh
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.
March 1, 2024

Hi @Bill Sheboy 

Thank you for the reply.
I have created a new post, link - Is is possible to compare EPIC LINK using advance ... (atlassian.com)

Thanks for the help

Like Bill Sheboy likes this
Harsh
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.
March 4, 2024

Hi @Bill Sheboy 

Any suggestion? thanks you

0 votes
Carin Talero August 25, 2022

Hi, in my case when an issue story/bug gets linked to an epic, I want to copy the value of a field "Source" from the newly linked epic to the issue.

But it can be that a new issue gets linked to an existing epic, or the issue is changed from one epic to another. So the advanced comparison cannot be just for the epic link been empty but even being changed.

Thnx

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 25, 2022
0 votes
Fazila Ashraf
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 3, 2021

Hi @Frank P Moley III 

I couldnt find a trigger that would execute on epic link updated on the ticket.. 

Looking through some old articles, looks like 'Epic link' was in the Field value changed earlier but caused some problems and not there anymore.

The best i could think of is to execute the automation on any update. Something like:

image.png

Nauman Ahmed August 23, 2022

@Fazila Ashraf @Bill Sheboy  and @Tom.edwards 

Hi - I have created an automation rule which is based off EPIC LINK field, for example 

If Issue Type is Bug + Epic Link is Empty + Custom Field is Empty

Then Set Custom Field to a particular value.

 

Problem is EPIC LINK is not there any more - so alternatively is there a work around to check if a task or bug is part of an epic or not?

Bill Sheboy
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.
August 23, 2022

Hi @Nauman Ahmed 

Please try using the parent smart value now, as this was made consistent across the issue hierarchy.  (I believe the exception is still subtasks, which are part of their parent issue.)

Note that with the change to use parent, rules often require additional logic.  For example, testing if something is a Story, Task, or Bug issue type before the testing parent will confirm the parent issue is likely to be an Epic.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer