Jira JQL: How to find linked issues NOT linked via Epic (or parent)

Maroline Johnson April 29, 2024

Hi Community, 

I'm trying to put together an automation that searches for tickets linked to an issue type I call AE Escalations and then generates a comment with general stats on those tickets. 

issueLink in linkedIssues("{{triggerIssue.key}}")

The following are all of this issue's linked tickets:
{{#lookupIssues}}
* Key: {{issue.key}}, Summary: {{summary}}, Type: {{issueType.name}}, Status: {{status.name}}, Fix Version: {{fixVersion}}
{{/}}

I run into a problem when one of those linked tickets is an Epic with child tickets. The search thinks that all of the Epic's child tickets are linked to the AE Escalation too, even though only the Epic is linked. The result from lookupIssues is a list much longer than expected. If there are 3 issues linked to the AE Escalation, I expect 3. But, if one of those linked issues in an Epic, I get all of its child tickets too. 

How do I stop this? I tried putting together a JQL that excludes the Epic, but those child tickets still pass the filter. 

Any help is appreciated! 

2 answers

1 accepted

0 votes
Answer accepted
Maroline Johnson May 14, 2024

Looks like what I thought was happening wasn't actually the case. I figured out my issue by using the {{issue}} and {{destinationIssue}} smart values you can use when the automation trigger is Issue Linked. Before, the rule was acting on the Epic (source issue) instead of the AE Escalation (destination issue). It works properly now that I'm having the rule act on the destination issue. 

0 votes
Kalyan Sattaluri
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.
April 29, 2024

Hello @Maroline Johnson 

Is your lookupIssues using the JQL you posted?

I am not familiar with issueLink, I tried ==> issue in linkedIssues("KPMS-60") and it seemed to give me just the linked epics and not child stories of that epic...

If you still receiving it, maybe add a clause ==>  issue in linkedIssues("KPMS-60") and issuetype = Epic

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events