Forums

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

How to filter the issues which has various linked reasons such as "is failed by", "needs fix", etc..

Chang
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 5, 2021

project = CR AND issuetype in (CR) AND fixVersion in (1.1.R01) AND reporter in (John) AND priority in (Major, Minor) AND issueFunction in linkedIssuesOf("project = EPIC AND issuetype in (task) AND summary !~ 'Risk' AND fixVersion = 1.1R1", "is failed by") OR issueFunction in linkedIssuesOf("project = EPIC AND issuetype in (task) AND summary !~ 'Risk' AND fixVersion = 1.1R1", "needs fix") ORDER BY priority DESC, updated DESC

 

Above syntax returns, both categories "is failed by" and "needs fix".

However, I'd like to make it simple and include the "needs fix" along with "is failed by" in the filter instead of using the OR operation.

 

1 answer

0 votes
Walter Buggenhout
Community Champion
November 5, 2021

Hi @Chang and welcome to the Community!

Due to all the issuefunction in() clauses and the many criteria involved, that looks like a horribly complex query you have there 😊. The way you search for issues that are not risks, suggest that you definitely have some room for improving your configuration, which would make your searching a lot simpler to.

But apart from that, the problem with your query is that you use combinations of AND and OR clauses. And when you do, you need to use brackets () to group the criteria in such a way that Jira can interpret them correctly.

It looks like you should add brackets around your 3 issuefunction clauses, so they combine correctly with the first part of your query:

Project = CR AND issutype = CR AND fixVersion = 1.1.R01 AND reporter = John
AND priority in (Major, Minor) AND (issueFunction in linkedIssuesOf("project = EPIC
AND issuetype = task AND summary !~ 'Risk' AND fixVersion = 1.1R1", "is failed by")
OR issueFunction in linkedIssuesOf("project = EPIC AND issuetype = task AND
summary !~ 'Risk' AND fixVersion = 1.1R1", "needs fix"))
ORDER BY priority DESC, updated DESC

If you look closely, I just added a ( before the first issuefunction statement and a ) after the last - just before the ORDER BY clause. I also replaced a couple of In operators with '=' to remove some of the other brackets where they are not necessary.

Hope this helps!

Suggest an answer

Log in or Sign up to answer