Jira filter query is not working as expected

Alby Siby
Contributor
November 19, 2024

 

Following filter does not work as expected:

issuetype = Incident AND project = SCORE AND component in (Compliance) AND priority = Major AND "Reported Date" > startOfMonth(-12) AND "Reported Date" < endOfMonth(-1) AND labels = Authority_investigation OR labels = Exchange_investigation OR labels = TSO_Request OR labels = VRC

 

Above filter we put only priority=major.But we are getting priority minor tickets as well in the filter result.Do you know why?

3 answers

3 accepted

2 votes
Answer accepted
Ashish Bijlwan
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.
November 19, 2024

Hi @Alby Siby 

Please try below JQL:

(issuetype = Incident AND project = SCORE AND component in (Compliance) AND priority = Major AND "Reported Date" > startOfMonth(-12) AND "Reported Date" < endOfMonth(-1)) AND (labels = Authority_investigation OR labels = Exchange_investigation OR labels = TSO_Request OR labels = VRC)

 

Thank you,
Ashish

0 votes
Answer accepted
karim -Atlassway-
Banned
November 19, 2024

Hi @Alby Siby 

You need to exclude other priorities from you Filter the same for other fields . 

Let’s say you want to find all the issue that are labelled with “frontend”. You can use this JQL query to find them:

  • Jira Search By Label (JQL labels : Project = XYZ AND labels in (“frontend”)

 

Then you will get all issues that have the value “frontend” as a Label. This does not exclude issues that have other Labels values also.

See more details in this article : https://community.atlassian.com/t5/App-Central-articles/Mastering-Jira-Filter-By-Labels-How-to-group-and-search-issues/ba-p/2855449

As alternative you can use Colored Label Manager  

Empower your project Management with Colored Label Manager.jpeg

 

Atlassway 

Cheers 

0 votes
Answer accepted
Utkarsh Agarwal
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.
November 19, 2024

Hi,

Please try the following query:

issuetype = Incident AND project = SCORE AND component in (Compliance) AND priority = Major AND "Reported Date" > startOfMonth(-12) AND "Reported Date" < endOfMonth(-1) AND (labels = Authority_investigation OR labels = Exchange_investigation OR labels = TSO_Request OR labels = VRC)

This ensures the priority = Major filter is applied to all labels conditions. The issue was caused by missing parentheses around the OR conditions, which Jira was interpreting separately from the priority filter.

Kind Regards
Utkarsh

Alby Siby
Contributor
November 19, 2024

Hi Utkarsh,

The query that you have shared is worked as expected.Thanks for the quick help

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events