Forums

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

JQL Query

n0179576
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!
January 5, 2023

Hello!  I seem to be running into a possible order of operations type issue in JQL.

Purpose: Filter to requests created >= the prior three days for a specific request type for three specific users.  I found when I only specify one user, the query works perfectly.  As soon as I add the additional the query seems to ignore the created date component and brings in requests back from 2020.

Any ideas on where I am going wrong?  Please and thank you :)

Query below: Note I replaced actual request and users with test for confidentiality.

created >= "-3d" AND "Customer Request Type" = "Test" AND assignee = Tester1 OR
assignee = Tester2 OR assignee = Tester3 ORDER BY due ASC

1 answer

1 accepted

2 votes
Answer accepted
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.
January 5, 2023

Hi @n0179576 -- Welcome to the Atlassian Community!

You are correct that the AND operators are processed before the OR ones.  Two ways to solve this are to group the ORs together or to use the IN operator:

created >= "-3d" AND "Customer Request Type" = "Test" AND ( assignee = Tester1 OR
assignee = Tester2 OR assignee = Tester3 )  ORDER BY due ASC

 

created >= "-3d" AND "Customer Request Type" = "Test" AND assignee IN (Tester1, Tester2, Tester3) ORDER BY due ASC

 

Kind regards,
Bill

n0179576
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!
January 6, 2023

Thank you so much Bill!  That worked like a charm!

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events