Forums

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

About JQL Query (Date Range and Status Resolved)

Barış Özer
Contributor
January 13, 2023

Hello everybody,

I want to show tickets with status "Resolved" in Service Desk Project and assignee baris.ozer between 01 January 2022 - 31 December 2022.

Is the JQL Query I made below correct?

 

project = SD AND status = Resolved AND assignee in (62069a8aed02400069a3ad5f) AND created >= "2022/01/01" AND created <= "2022/12/31" AND resolution != unresolved ORDER BY created ASC

1 answer

1 accepted

0 votes
Answer accepted
Ste Wright
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 13, 2023 edited

Hi @Barış Özer 

Can I confirm the logic for your rule is:

  • Project = SD
  • Status = Resolved
  • Resolution is not empty
  • Assignee = User
  • Date = Created - created during last year

---

If this is correct, this should work:

project = SD AND status = Resolved AND resolution is not EMPTY AND assignee = 62069a8aed02400069a3ad5f AND createdDate >= startOfYear(-1) AND createdDate <= endOfYear(-1) ORDER BY created ASC

or with static dates:

project = SD AND status = Resolved AND resolution is not EMPTY AND assignee = 62069a8aed02400069a3ad5f AND createdDate >= 2022-01-01 AND createdDate <= 2022-12-31 ORDER BY created ASC

Ste

Barış Özer
Contributor
January 13, 2023

Hi @Ste Wright 

Is my rule wrong? I think is right?

Like Ste Wright likes this
Ste Wright
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 13, 2023

Hi @Barış Özer 

Yes, yours also works the same way :)

I usually avoid "Unresolved" in resolution queries, in case someone creates it as a resolution option!

But your JQL should produce the same results as what I suggested.

Ste

Barış Özer
Contributor
January 13, 2023

Hi @Ste Wright 

I only need statuses that are "resolved".

This is why resolution != unresolved exists.

Barış Özer
Contributor
January 13, 2023

Hi @Ste Wright 

This JQL Rule looks nicer and readable.

project = SD AND status = Resolved AND resolution is not EMPTY AND assignee = 62069a8aed02400069a3ad5f AND createdDate >= startOfYear(-1) AND createdDate <= endOfYear(-1) ORDER BY created ASC

Ste Wright
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 13, 2023

Hi @Barış Özer 

Just to clarify, Status and Resolution are two different fields.

If you're looking for just Issues with a Status of Resolved, and the Resolution can be set to anything (including empty) - then the "resolution is not EMPTY" part of the query is not required.

To see how Status and Resolutions differ, see this help page: https://support.atlassian.com/jira-cloud-administration/docs/what-are-issue-statuses-priorities-and-resolutions/

Ste

Like Barış Özer likes this

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