Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to set operator priority in a quick filter when using AND and OR?

Jan Walsh July 16, 2024

I would like the following Quick Filter that includes both:

- issues of type "task" with any status

- issues of type "feature" with status "Ready to Dev"

 

I would expect this to work, assuming that the AND operator takes precedence over the OR operator:

type in (Task) OR type in (Feature) AND status in ("Ready to dev")

 

However, when I toggle the filter on my board, I only get issues of type "task".

 

I also tested adding parentheses like this: 

(type in (Task)) OR (type in (Feature) AND status in ("Ready to dev"))

But I got the same result.

 

Is this kind of query possible with Quick Filters? What's wrong with query?

2 answers

1 accepted

2 votes
Answer accepted
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 16, 2024 edited

Hi @Jan Walsh ,

welcome to the Atlassian community.

Please use parentheses like this:

type = Task OR (type = Feature AND status = "Ready to dev")
Bill Sheboy
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.
July 16, 2024

Hi @Jan Walsh -- Welcome to the Atlassian Community!

Adding to Hana's suggestions:

To help learn more about the order of operations in JQL, please review this documentation and free training from Atlassian:

https://support.atlassian.com/jira-software-cloud/docs/jql-keywords/

https://university.atlassian.com/student/path/849533-gain-project-insights-through-jql

 

Kind regards,
Bill

Like Hana Kučerová likes this
Jan Walsh July 17, 2024

Hi @Hana Kučerová

Unfortunately, I have already tried (and just tried again) the query that you recommended.

Here is a screenshot before I save the Quick Filter: 

image.png

Here is a screenshot after I click "Update":

image.png

As you can see, the parentheses aren't saved. When I open it again, the parentheses aren't there. And, when I refresh my board and use the filter, only tasks appear.

I confirm that I have issues of type "Feature" that should appear and to confirm this even more, a query like this [type = Feature AND status = "Ready to dev"] works to retrieve Feature issues with this status.

Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 17, 2024 edited

Hi @Jan Walsh ,

you are right, the editor is removing the parentheses.

I've found out there have been issues with this behaviour in the past.

But, it works for me, even without the parentheses.

So, you are saying, that if you create three filters

  1. type = Task
  2. type = Feature and status = "Ready to dev"
  3. type = Task OR type = Feature and status = "Ready to dev"

then when you use only the first one - all the Tasks show, the second one - all the Features with status "Ready to dev" show, but the third one shows only the Tasks?

Like Bill Sheboy likes this
Bill Sheboy
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.
July 17, 2024

There are several places in Jira where it removes any parentheses entered.  In some cases, it appears to automagically reorder the clauses to match the original intent...some times not so much.

The only workaround I have found is to ensure one orders the operators and clauses (perhaps adding extra ones) to ensure the Boolean order of precedence aligns with what is needed.  I believe the order is:

  1. NOT
  2. AND
  3. OR
Jan Walsh July 18, 2024

@Hana Kučerová It turns out that the issues I want to filter by are not of type "Feature", but of type "Story". That was the problem!

Thanks for making me redo all these checks which allowed me to pinpoint the problem :)

 

Like Hana Kučerová likes this
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 18, 2024

I'm happy to help :-)

0 votes
Nikola Perisic
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 16, 2024 edited

Hi @Jan Walsh 

This query looks up for everything in the parantheses first then adds everything outside of parantheses.

 

issuetype = Task OR (issuetype = Feature AND status = "Ready to dev")
Jan Walsh July 17, 2024

Hi @Nikola Perisic

Unfortunately, setting parentheses in the query is not saved when updating the Quick Filter. See my response to Hana's comment above. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Upcoming Jira Events