Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Link issue to existing EPIC

Hope someone knows a way to resolve the following task:

Trigger: Rule is triggered when an issue is transitioned from status A to B.

What should the rule do: If an EPIC (in this case with the same name as the issue) exists, link the issue to the existing epic.

Problem: Via edit issue and selecting the field Epic-Link i can only choose

  • Current issue
  • Parent issue
  • Epic issue
  • Trigger issue

I assume that none of these is the right one . So I figured that i could use the advanced option to manually set the epic-link - but this only works with the issue key of the epic - not the name. 

"fields": {
"Epic-Link": "{{issue.summary}}"

So, either I need a way to get the Epic issue key or a different approch to this problem.


1 answer

1 accepted

1 vote
Answer accepted

Hi @jbeg 

For a question like this, please consider posting an image of your complete rule and an audit log entry from a failed run.  That will provide the community some context to try to help.  Thanks!

You do not indicate if you are using Jira Cloud or Server/Data Center, so I am going to assume for now "Cloud"...

  • Trigger: issue transitioned from A to B
  • Action: lookup issues on JQL to find the desired epic
  • Condition: {{lookupIssues.size|0}} = 1
  • Action: edit the issue to set the epic link to {{lookupIssues.key}}

When adding the value to the edit, type in the value {{lookupIssues.key}} and it will appear below the field, then select it to use the smart value.

Best regards,


Hi Bill, 

thank you very much for the reply. We are using Jira Server - so if I am not mistaken, the lookup feature is not available. 

This would probably solved my quesion the way you described it. Unfortunately this feature ist not available on server

Are there any other solutions?

Hi @jbeg 

For server without Lookup Issues, how about a slower work-around using the bi-directional nature of issue links...

  • Trigger: issue transitioned from A to B
  • Branch: on JQL to find the desired epic matching your criteria
    • Action: add a link of a type you do not use to the trigger issue.  Perhaps, split from/to
  • Action: re-fetch to reload the trigger issue's data and see the added link
  • Action: edit issue to set the epic link to the key value in the specific link added.  You may need to use a regular expression to yank out the key

Please note that I haven't tried this as I do not have server version, so let me know how this works (or doesn't ;^)


Hi @Bill Sheboy ,

this was a quality answer! Thank you very much!

It is quite a workaround and complex for just such a simple task - but for the server version quite nessescary as it looks. 

I got the link key from {{issue.issuelinks.first.outwardIssue.key}} so no regex magic was needed.

Thanks again for your help

Like Bill Sheboy likes this

Suggest an answer

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

Do you use Jira Cloud with Microsoft Teams?

Hi, Jira users! Do you use Jira alongside Microsoft Teams? We want to hear how you’ve used the power of Jira Cloud and Microsoft Teams (via the Jira Cloud for Microsoft Teams app) to achieve a team...

533 views 1 10
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