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
4,293,797
Community Members
 
Community Events
165
Community Groups

Automation on Epic Link

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?

2 answers

1 accepted

2 votes
Answer accepted

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

Thank you so much, this worked perfect. 

Like Bill Sheboy likes this

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 

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

Hi @Bill Sheboy ,

 

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

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...

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

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.

Thanks Bill,

 

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

Like Bill Sheboy likes this

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

"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"?

0 votes
Fazila Ashraf Community Leader Jun 03, 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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,130 views 34 44
Read article

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