Forums

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

JQL And statements or statement

Holly Schomann
Contributor
August 27, 2024

I would like to create a JQL filter that will show one individuals work from 2 separate fields, in the current open sprint.
For example, please show me any ticket in which John Smith is the assignee  of the ticket or if John Smith is the QA Tester of the ticket AND those tickets are in the open sprint.

For some reason, I can't get both the And or statement to both work. This is what I have tried, what am i doing wrong?

Thanks

Holly

project = DA

AND assignee = 6385a95c00cb2fc3f989925b

OR "QA Tester[User Picker (single user)]" = 6385a95c00cb2fc3f989925b

AND sprint IN openSprints() ORDER BY created DESC

1 answer

1 accepted

2 votes
Answer accepted
Mikael Sandberg
Community Champion
August 27, 2024

When you are using OR in your filter it important to also use (). The way your JQL is currently configured it will get you all issues in the DA project that are assigned to John Smith OR all issues in any project that John Smith is the QA Tester and in an open sprint.

This should get you the result you are looking for:

project = DA AND (assignee = 6385a95c00cb2fc3f989925b OR "QA Tester[User Picker (single user)]" = 6385a95c00cb2fc3f989925b) AND sprint IN openSprints() ORDER BY created DESC

Holly Schomann
Contributor
August 28, 2024

Thank you SO much! This was driving me crazy!!! 

Like Mikael Sandberg likes this

Suggest an answer

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

Atlassian Community Events