Unexpected behaviour in filter query? (aka Am I doing something wrong?)

We have the following default filter query for a Kanban board.

(
    (project = "Red Projects" OR component = TeamRed) 
     AND resolution = Unresolved
) 
OR     
(
    (component = TeamRed OR project = "Red Projects")
     AND (status = Done OR status = Closed OR status = Resolved)
     AND updated < 15d
) 
ORDER BY Rank ASC

What we are doing here is trying to see all unresolved items, as well as any resolved items which have been updated less than 15 days ago.  We are still having tasks/bugs/epics/etc show up (going by the last updated date) which are much older than this.  There's one right now for example which has a last updated date of 2012/12/01.

So a couple of things which I've noted.

  • The updated < 15d seems to be ignored when you use < 15, but on the other hand shows only 27 items (all unresolved) instead of the entire list of 147 items.
  • nested queries are broken down by Atlassian into singly bracketed queries.

eg. the above actually ends up as the following which makes no sense.

(project = "Red Projects" OR component = TeamRed) 
AND resolution = Unresolved
OR     
(component = TeamRed OR project = "Red Projects")
AND (status = Done OR status = Closed OR status = Resolved)
AND updated &lt; 15d
ORDER BY Rank ASC

 

We could of course use the Kanban releases but have yet to see a thorough enough explanation which doesn't sound like it's going to release all of the project tasks/stories/bugs/etc from other boards as well.

 

 

 

1 answer

1 accepted

This widget could not be displayed.

I think you've got your relative dates wrong, if I am reading the question correctly.  Might be easier to explain the clause:

AND updated < 15d

That means "updated date is before a date 15 days in the future ".  I think you actually want:

AND updated > -15d

That means "updated after a date 15 days in the past"

(Also, the default for "no units" is usually minutes, so <15 is the same as <15 minutes)

Thanks! I will keep this in mind. It would be incredibly rare I'd refer to a date in the future at all so that didn't cross my mind at all.

No problem, I do exactly the same all the time when I'm sketching out JQL I do search in the future, but it's usually something like "due date in the next two weeks", but dates in the past do form the vast majority of everyone's searches in my experience!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Apr 22, 2018 in Jira Software

How-to setup a secured Jira Software 7.9.0 on Ubuntu 16.04.4 in less than 30 minutes

...PermissionsStartOnly=true User=www-data Group=www-data ExecStart=/opt/jira/bin/startup.sh ExecStop=/opt/jira/bin/shutdown.sh TimeoutStartSec=120 TimeoutStopSec=600 PrivateTmp=true [Install] WantedBy...

1,481 views 10 12
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you