Combine Two Filters where one has a date range

Steve Fitzgerald
Contributor
January 15, 2024

I'm combining two filters using the Project = XXX and filter = yyyy Or filter = ZZZZ. The first filter does not have a date constraint, but the second filter has a date constraint where it's only looking at issues created in the last 30 days. 

 

When I run the filters separately it should result in a count of 45 issues, but when I run then together it (see above) it results in 31 records. Could the date constraint be limiting the results? 

3 answers

3 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.
January 15, 2024

Hi Steve, 

Your filter looks to me like it is written in natural language, good for us humans, but not logical for the computers, and it is very likely that you are explaining the logic in the inflection and emphasis when you say it out loud.  We can get it, the computers do not.

You say 

  • Project = XXX and filter = yyyy Or filter = ZZZZ

But does that mean what it is written as?  Could you mean

  • Project = XXX and filter = yyyy Or filter = ZZZZ
  • Project = XXX and filter = yyyy Or filter = ZZZZ

When you have both "and" and "or" in a logic statement (or any statement that mixes the 5 base logic gates other than "not"), humans generally tend to get it wrong.

When talking to a computer about a search, always specify it with parentheses if you mix joined clauses.  "A and B and C" or "A or B or C" are both fine as they don't mix.  But even if your filter worked ok, it is worth explaining it to other humans.  And the computer needs precision (Even our new AI overlords get this horribly wrong). You are trying to run one of these two, but I have no idea which one:

  • (Project = XXX and filter = yyyy) Or filter = ZZZZ
  • Project = XXX and (filter = yyyy Or filter = ZZZZ)

 

(FWIW, I know Jira simply reads left to right when you give it a plain filter with no explanation, like every other computer system given no choice, but that tends to lead to a conclusion different to the human one, because we are not logical and like ignoring reality)

1 vote
Kris Dewachter
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2024

Hi @Steve Fitzgerald ,

Please make sure your JQL where you combine the 2 filters is correctly formatted.

Maybe you can post the JQL here ?

It should look something like this :

Project = XXX and (filter=YYYY OR filter =ZZZZ)

Best regards,

Kris

0 votes
Sebastian Krzewiński
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2024

Hi @Steve Fitzgerald 

 

Did you try to combine all filters in one JQL query?

 

Regards,

Seba

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events