Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Would like to know what the JQL to be for tickets resolved/closed in a certain month

Hey team,

I checked and seems like "Issues closed last month" should be sth like this? 

Project = yourProject AND resolutiondate <= endOfMonth("-1") AND resolutiondate >= startOfMonth("-1")

https://confluence.atlassian.com/jira063/advanced-searching-functions-683542527.html

 

Also, I am using the below JQL


Project = xx and reporter =xxx AND status in (Closed, Resolved, Cancelled) AND statusCategoryChangedDate > startOfMonth(-1) AND statusCategoryChangedDate < endOfMonth(-1)

to get the solved tickets for last month only no matter when they were created for team, can you let me know if this should be the most accurate? Just trying to differentiate in which scenario we should use resolved or  resolutiondate, or statusCategoryChangedDate

Can you please help me check?

Thanks,

Caro

1 answer

1 accepted

0 votes
Answer accepted
Brant Schroeder Community Leader Jul 13, 2021

@Caroline Feng Welcome to the community.

Use this for resolved issues.

project = XXX AND resolved >= startOfMonth(-1) AND resolved <= endOfMonth(-1)

Hey Brant @Brant Schroeder ,

Thanks for your reply.

1. Can you let me know why this is not the ideal one?

Project = xx and reporter =xxx AND status in (Closed, Resolved, Cancelled) AND statusCategoryChangedDate > startOfMonth(-1) AND statusCategoryChangedDate < endOfMonth(-1)

We would like to include all closed, resolved and cancelled not just with 'resolved' tickets in last month only.

 

2. I also tried syntax Project = xx and reporter =xxx AND status in (Closed, Resolved, Cancelled) AND statusCategoryChangedDate >= 2021-06-01 AND statusCategoryChangedDate <= 2021-06-30 but the results number is different from statusCategoryChangedDate > startOfMonth(-1) AND statusCategoryChangedDate < endOfMonth(-1)? Not sure why this is the case..

Thanks,

Caro

Brant Schroeder Community Leader Jul 15, 2021

@Caroline Feng 

In one you are looking at the status and not resolution.  I am looking at the resolution of the issue.  I am assuming that all the statuses that you shared have a resolution.  So all of those statuses would be included in the query.

Have you identified the issues that are included in one query but not the other?  That might give you some insight into what is different.  

Got it @Brant Schroeder 

Just trying to differentiate in which scenario we should use resolved or resolutiondate, or statusCategoryChangedDate AND status in (Closed, Resolved, Cancelled) 

Can you please help me on this? Thanks again. 

Brant Schroeder Community Leader Jul 20, 2021

@Caroline Feng Let me just provide some insights into the fields and hopefully, this will help you understand when it is best to use them.

Status - Status of the issue.  The status is defined through your workflow and each issue type can have different workflow and statuses.  

Status Changed Date - Whenever a status is changed that change has a date. 

Resolved - When an issue is completed in the workflow you should mark it as resolved.  An issue could be resolved multiple times depending on the workflow and if the issue can be reopened.

Resolution Date - Whenever an issue is resolved is has a resolution date.

 

When I create a query that is looking for all completed issues I usually use resolution.  Then in the future, if I add a new workflow that contains new statuses I do not have to update the JQL.  The resolution date allows me to see if the issue was resolved during a certain period.

The status allows me to target a specific status(s) and the change date allows me to target the time frame.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you