Forums

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

created >= startOfYear() AND assignee = name1 OR assignee = name2

Ankit Jain April 13, 2022

Hi We are using self hosted Jira v8.5.3

I am trying to export results but when I combine two or more than two users using "OR" it outputs results for December 2021 and for year 2022(current year is 2022) also but when I use single user it outputs correctly that is for year 2022 only

 

I want to know why it shows wrong output when combined users???  Why It is taking December 2021 in current year 2022

 

1 answer

1 accepted

2 votes
Answer accepted
Nic Brough -Adaptavist-
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.
April 13, 2022

Welcome to the Atlassian Community!

When mixing AND and OR statements in a filter, Jira needs guidance on how you want to join the clauses.  Without any, it simply reads left to right across your query.

The query you have written works out as

created >= startOfYear() AND assignee = name1

OR

assignee = name2

So it's returning everything for the second assignee.

Try created >= startOfYear() AND ( assignee = name1 OR assignee = name2 )

Ankit Jain April 13, 2022

perfect! its working now,

I just landed on a job where I need to manage Jira, taking help from online searches

 

thank you so much

Suggest an answer

Log in or Sign up to answer