JQL - Trouble finding issues 'linkedIssuesOfAll' by more than 1 type of link

andrew gibbs April 17, 2019

I need some JQL that will return issues that have linked issues that are linked by the 'is caused by' OR 'Bug Found' Jira links.

So far I've only been able to get one of the other ("Bug Found" or "is caused by").

The JQL below works, but only for issues linked by "Bug Found":

issueFunction in linkedIssuesOfAll('issue in("ISSUE-01", "ISSUE02")', "Bug Found")

If I try using an OR statement to add the "is caused by" argument, as below:

issueFunction in linkedIssuesOfAll('issue in("ISSUE-01", "ISSUE02")', "Bug Found" OR "is caused by")

I get an error:

Error in the JQL Query: Expecting ')' or ',' but got 'OR'. (line 1, character 85)

I've tried many differing ways of using the OR statement with the "Bug Found" and "is caused by", including enclosing them both in parenthesis, single quotes, double quotes etc, but I can't get it working.

 

All help appreciated :)

 

1 answer

1 accepted

1 vote
Answer accepted
Thomas Schlegel
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 17, 2019

Hi @andrew gibbs ,

maybe this is what you are looking for:

issueFunction in hasLinks("Bug Found") or issueFunction in hasLinks("is caused by")

andrew gibbs April 17, 2019

Thanks @Thomas Schlegel - perfect :)

Thomas Schlegel
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 17, 2019

You're welcome, @andrew gibbs 

Please click the "This helped me" - button, so that the question gets an "Answered" status.

Other users with similar questions find an answer faster that way.

Like andrew gibbs likes this
Kriska Ágnes November 10, 2022

@Thomas Schlegel , please help with the exact syntax here:

how need to combine the two issueFunction here: both criteria (linked to an exact issue AND the link types are given) are important.

 

issueFunction in linkedIssuesOfAll('issue in("ISSUE-01", "ISSUE02")', "Bug Found" OR "is caused by")

AND

issueFunction in hasLinks("Bug Found") or issueFunction in hasLinks("is caused by")

 

Thanks

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 10, 2022

Hi @Kriska Ágnes ,

I didn't test it, but I think what is missing in your JQL are correct brackets:

maybe 

(issueFunction in linkedIssuesOfAll('issue in("ISSUE-01", "ISSUE02")', "Bug Found" OR "is caused by"))

AND

(issueFunction in hasLinks("Bug Found") or issueFunction in hasLinks("is caused by"))

works better.

Suggest an answer

Log in or Sign up to answer