Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to link two issues from same Epic via JMWE add-on

Andrey July 2, 2018

Hi guys, 

I'm going to use post-function "Link issues to the current issue (JMWE add-on)" for "create issue" transition and need to link new issue with existing one (with specific summary) only if they both have equal "Epic link" value.  The value itself doesn't matter, but it must be the same in both issues which are going to be linked.

How to write this condition correctly?

PS: Instead of "Epic link" I can use some other field like label, etc.

Many thanks!

1 answer

0 votes
David Fischer
Community Champion
July 3, 2018

If you are on Jira Server:

The JQL query will be something like:

summary ~ "Another stoey" and "Epic Link" = ${issue.get("Epic Link")} and key != ${issue.key}

If you are on Jira Cloud:

The JQL query will be something like:

summary ~ "The specific summary" and "Epic Link" = {{issue.fields["Epic Link"]}} and key != {{issue.key}}

Andrey July 3, 2018

Thanks David, but it returns error:

Message:
Error in JQL Query: Expecting either a value, list or function but got 'and'. You must surround 'and' in quotation marks to use it as a value. (line 1, character 80)
Parsed JQL query:
project = GL and "Summary" ~ "Send Welcome Email to Client" and "Epic Link" =  and key != GL-31

 image.png

David Fischer
Community Champion
July 3, 2018

Did you test it against an issue (GL-31) that has a parent Epic?

Of course, if not all issue that go through this transition have a parent Epic, you'll need to protect against that. You can just add double quotes around the Epic Link value:

summary ~ "The specific summary" and "Epic Link" = "{{issue.fields["Epic Link"]}}" and key != {{issue.key}}
Andrey July 6, 2018

Thanks for your help, David!  I realized that this won't work for the sub-tasks level because sub-task doesn't have an Epic, so I just change my logic of the process.

Suggest an answer

Log in or Sign up to answer