JQL Query for all "is resolved by" linked issues regardless of project

Ryan April 4, 2024

I have criteria for a baseline set of issues that looks like (project = "X" AND ("Epic Link" = A OR "Epic Link" = B OR "Epic Link" = C) AND labels = label1)

Need a JQL query that will provide all Jiras linked to the set returned from the above where the issuelinktype is "is resolved by"  even if the Jira that resolves one of them is in a different project (or for some reason does not have an epic link referenced in the above).

Is that possible?

Any help much appreciated.

1 answer

1 accepted

0 votes
Answer accepted
Robert Wen_ReleaseTEAM_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2024

Hello @Ryan ! Welcome to the Atlassian Community!

The JQL snippet you're looking for is the following.

 issueLinkType = "is resolved by"

This one is going to ignore the project and Epic Link limitations.  If you want this to apply with project and Epic Link limitations, you'd append and add an AND, but that's going to limit it to the project and Epic Links. 

Ryan April 4, 2024

Hi @Robert Wen_ReleaseTEAM_Robert Wen_ReleaseTEAM,

I am familiar with issueLinktype, but how do I incorporate that into the baseline query such that I get a results set described as follows:

(project = "X" AND ("Epic Link" = A OR "Epic Link" = B OR "Epic Link" = C) AND labels = label1)  provides 300 Jiras.  These 300 Jiras have 500 Jiras across various projects that are linked to the original 300 with "is resolved by" (and many more linked issues with other linktypes I do not want to see).

I'm trying to return the 500 that are linked to the 300 by "is resolved by"

Thanks a bunch

 

Robert Wen_ReleaseTEAM_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2024

Is ScriptRunner an option?  There's an enhanced JQL function in ScriptRunner called linkedIssuesOf()

https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-enhanced-search/jql-functions#linkedissuesof

Ryan April 4, 2024

good question.  I tried using it and the drop down recognizes the funtion, but I always get the orange ! for syntax when I try:
Query 1: 

issueFunction in linkedIssuesOf ((project = "X" AND ("Epic Link" = A OR "Epic Link" = B OR "Epic Link" = C) AND labels = label1), "is resolved by")

Or I try this:

Query 2: 

linkedIssuesOf ((project = "X" AND ("Epic Link" = A OR "Epic Link" = B OR "Epic Link" = C) AND labels = label1), "is resolved by")

The baseline query always works:  (project = "X" AND ("Epic Link" = A OR "Epic Link" = B OR "Epic Link" = C) AND labels = label1)

Is something wrong with the structure of the query 1 or 2 syntaxwise?

 

Ryan April 4, 2024

to clarify, I get this error:  "Error in the JQL Query: Expecting ')' or ',' but got 'XYZ'. (line 1, character 47)"

for the query issueFunction in linkedIssuesOf ((project = "XYZ Project" AND ("Epic Link" = A OR "Epic Link" = B OR "Epic Link" = C) AND labels = label1), "is resolved by")

seems like the space in the project name is messing something up

Robert Wen_ReleaseTEAM_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2024

What about the following?

((project = "XYZ Project") AND ("Epic Link" = A OR "Epic Link" = B OR "Epic Link" = C) AND (labels = label1))

or if you want to keep the number of parentheses smaller,

(project = "XYZ Project" AND "Epic Link" in (A,B,C) AND labels=label1)
Ryan April 9, 2024

Thank you!  when you simplified the query I tried alternating the quotes and it works!

Like Robert Wen_ReleaseTEAM_ likes this

Suggest an answer

Log in or Sign up to answer