Trouble filtering issues with specific statuses and dates

I'm having some problems getting JIRA's filtering working the way I want, and their JQL documetation isn't helping.

Here's what I'm trying to do:

  1. See issues across multiple project (Achieved)
  2. See specific issue types (Achieved)
  3. See specific issue statuses (Achieved)
  4. For one specific issue status, I only want to see issues that have been updated in the past 5 days (Need Help Here)

The idea behind (4) is to keep the filter relatively clean, so it's logical to ignore any "Closed" issue that hasn't been updated in at least 5 days.

Here's my JQL statement

project in (AI, HD, CON) AND issuetype in (Bug, Story) AND status = Closed AND updated <= -5d OR status in ("In Staging", "Rejected") AND issuetype in (Bug, Story) ORDER BY Rank ASC

However, the "updated <= -5d" seems to be ignored, and returns pretty much any story that's closed, regardless of when it was last updated.

Is this just not achievable in JIRA?

2 answers

1 accepted

This widget could not be displayed.

project in(AI, HD, CON) AND issuetype in(Bug, Story) AND (status = Closed AND updated <= -5d) OR (status in("In Staging", "Rejected") ) ORDER BY Rank ASC

You need to separate your two separate clauses with parentheses.

Issuetype was in there twice which is redundant.

Thanks Jamie. I'd experimented with Parenthesis but ran into problems, my limited knowledge of "JQL" made me think that perhaps parenthesis wasn't understood so removed them.

I flipped "updated <= -5d" to "updated >= -5d" which seems to finally be giving me what I expected. I found that syntax incredibly odd.

This widget could not be displayed.

Your brackets are not set correctly! The OR clauses must be in in brackets.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

195 views 3 0
Join discussion

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