Forums

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

having difficulty with Advanced search using multiple OR keywords

Simone Frost
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!
October 8, 2019

hi there!

 

I've been using an advanced search looking for unmanaged open issues by looking at the status or content of the Due Date field.  I'm looking for issues that don't have a due date, or issues that are past their established due date.  I get appropriate results with this: 

  • project = NAME AND status in ("In Progress", "To Do", ESCALATED) AND (due is EMPTY OR due <= "0")

There are some teams using Sprints to manage their workload, so I'd like to add another OR to this search.  The results ignore the due <= "0" filter, showing issues with a due date later than today.  I've tried all of these:

  • project = NAME AND status in ("In Progress", "To Do", ESCALATED) AND (due is EMPTY OR (due <= "0" OR Sprint is EMPTY))
    project = NAME AND status in ("In Progress", "To Do", ESCALATED) AND (due is EMPTY OR (Sprint is EMPTY OR due <= "0"))
    project = NAME AND status in ("In Progress", "To Do", ESCALATED) AND (due <= "0" OR (due is EMPTY OR Sprint is EMPTY))
    project = NAME AND status in ("In Progress", "To Do", ESCALATED) AND (due <= "0" OR (Sprint is EMPTY OR due is EMPTY))
    project = NAME AND status in ("In Progress", "To Do", ESCALATED) AND (Sprint is EMPTY OR (due is EMPTY OR due <= "0"))
    project = NAME AND status in ("In Progress", "To Do", ESCALATED) AND (Sprint is EMPTY OR (due <= "0" OR due is EMPTY))

All of these will return issues where the due date is later than today, seemingly ignoring the due =< "0" request.  Does anyone have ideas where I can apply these three OR keywords in a search appropriately?  Thanks! 

 

2 answers

1 accepted

0 votes
Answer accepted
fran garcia gomera
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.
October 9, 2019

when you add the " OR sprint is empty " you are going to get every issue that fit that condition, no matter what happens with duedate if you don't want the issues with sprint empty that have due date >0 you should use something like

project = NAME AND status in ("In Progress", "To Do", ESCALATED) AND (due is EMPTY OR  due <= "0" OR (Sprint is EMPTY AND due <= "0"))

but every issue that fits  Sprint is EMPTY AND due <= "0" also fits due <= "0" so this is pointless 

showing it in a graphic (forgive the mistake in the <= and the >):

your initial query gives you the green and red issues, no matter the colour of the sprint column

All of the other querys give you every green, every red (no matter the colour of the sprint) and every yellow (no matter the colour of the Due column)

The query i give you takes gives you the green, the red and the yellow that are also red, so you have again green and red 

 

due and sprint.png

Simone Frost
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!
October 9, 2019

Thanks!  This works great. 

0 votes
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.
October 8, 2019

Due <= 0  means "the due date is before or equal to <base date of timestamps in the datatabase>", which is probably going to be something like 1st Jan 1970.

I think what you want is "Due <= now()"

Suggest an answer

Log in or Sign up to answer