It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

having difficulty with Advanced search using multiple OR keywords

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

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

Thanks!  This works great. 

0 votes

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
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

261 views 1 2
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you