Forums

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

Help with correct JQL

Edimara December 1, 2022

Hi guys

 

I need help with JQL that brings all issuetypes except sub-tasks created before 01/01/2022  and all unresolved issue types (Iniciativa, Epic, Story) created before 01/01/2020. 

I created this query, but I notice that don't work as well:

 

created >= 2021-01-01 AND status not in (Removed, Cancelled, Cancelado) AND issuetype not in (Sub-task) OR 
created >= 2020-01-01 AND created <= 2020-12-31 AND issuetype in (Iniciativa, Epic, Story)
AND statusCategory not in (Done)

 

2 answers

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.
December 1, 2022

Your JQL does not match the question - without clear grouping, the computer cannot tell what you are actually asking.  It has no choice but to read left-to-right, which is not what your question is phrased as. 

There's also some fuzziness around status and resolution - you say unresolved, but then look at the statusCategory, which does not necessarily mean unresolved.  I've stuck with statusCategory here.  And your "created before" is actually written as "created after" in your query.  And the dates are different to your question.

Your question should be written as


( created <= 2022-01-01 AND issuetype = standardissuetypes() )

OR

(
created <= 2020-01-01 AND issuetype in (Iniciativa, Epic, Story)
AND statusCategory != Done
)
0 votes
Alex Koxaras _Relational_
Community Champion
December 1, 2022

Hi @Edimara 

I've tried your JQL with a small change, but I think it works fine:

created >= 2021-01-01 AND status not in (Closed, Cancelled) AND issuetype in standardIssueTypes() OR created >= 2020-01-01 AND created <= 2020-12-31 AND issuetype in (Bug, Epic, Story) AND statusCategory not in (Done)

Did you reindex your instance? Maybe that's the problem.

Alex Koxaras _Relational_
Community Champion
December 1, 2022

In the above JQL I had to make changes to reflect my setup

Suggest an answer

Log in or Sign up to answer