JIRA 4.4 search/filter how to find issues resolved in last seven days?

Hi I've been playing around with jqlQueries trying to retrieve a list of issues for a given project where the status has changed to resolved in the past week. I need this to use in a jqlQuery for the jiraissues confluence macro.

I have tried things like the following advanced search syntax:

resolved > -7d

but have not had any luck.

Any help is much appreciated.

Thanks in advance

Chris.

11 answers

1 accepted

15 votes

It's: resolutiondate >=-1w

Tip: You could run the "Recently Resolved" filter from any project, switch to advanced, and see the jql for this like that.

Thanks for that, it solved my problem. :)

Great, can you mark my answer as correct, by clicking the check mark ;-)

You saved my day. Worked like a champ

Hi Chris,

randomly came across this looking for something else. Jamie's answer is right but there is something you should be aware of when using date searches like -1w.

-1w is short hand for -7 days which is translated into -7*24 = 168 hours. So if you run this on 15:00hrs on the 28th, your results would only include data from 15:00 on the 21st. Depending what time you run this, you get different results, even if no data has changed

if you're looking for anything resolved from 21st to 28th, then you would use this:

resolutiondate >= startOfDay(-7)

It also has the advantage that it timezone aware, so if you're sending results to users in different timezones, it tailors the results to suit the user's locale.

-7d is -7*24 hours == now() - 168 hours

So if you ran this query at 13:00, it would include from 13:00 7 days ago.

If you this query at 16:00, it would include from 16:00 7 days ago

startOfDay(-7) means that the time doesn't change during the day you run the query. https://confluence.atlassian.com/display/JIRA/Advanced+Searching+Functions#AdvancedSearchingFunctions-startOfDay%28%29

I think I also ran some test with users in different timezones and it adjusts to the users local time for start of day.

In essence, -7d is how a computer thinks, startOfDay(-7) is how humans tend to think.

Thanks, this works! However, resolved > -30d worked for me as well. And the question-answers here also confirm it works: https://answers.atlassian.com/questions/74444/create-filter-with-relative-date

So, the follow-up question is,
is there a difference between following filters:
resolutiondate >= startOfDay(-7)
resolved >= -7d
?

Thanks a lot!
one more follow up question.
Would the following filters be equivalent?

resolutiondate >= startOfDay(-7)
resolved >= startOfDay(-7)

I am interested in what is the difference between resolutiondate and resolved.

I have a question, we are running the following query:

resolved >= startOfDay(-6d) ORDER BY resolved

The problem we are getting some issues that are not resolved - they are still Opened and Unresolved.

The problem started just recently as the query was still working about 1 - 2 weeks ago. I would like to know what could have caused the change.

Can you try running the following query:


resolved >= startOfDay(-6d) and resolution = Unresolved ORDER BY resolved

This would give you results then?

(trying to figure out if this is possible, because in my case it's always an empty resultset)

I also used this querry and it produces exactly what I wanted:

project = GVUKSUP AND resolved >= startOfDay(-6d) and resolution != Unresolved ORDER BY resolved

Maybe they were resolved then reopened? Or you have a resolution value called "Unresolved"?

Resolved and then reopend was my first thought as well, but the value of resolved would be emptied again

The result is I get only the Unresolved issues with this.

Just want to understand why our querry changed from giving only the resolved defects as it did 2 weeks ago? Or is the result expected for the Jira querry that we are running to get both resolved and Unresolved issues in this querry?

resolved >= startOfDay(-6d) ORDER BY resolved

resolutiondate > startOfWeek(-1w) AND resolutiondate < startOfWeek()

 

Can some of you please help me with query to fetch the data of resolved issues between Monday to sunday.

What is the startOfWeek in JIRA. Is it Monday or Sunday?. Does it include timezone too? If it is which timezone

 

Can some of you please help me with this issue.

I have almost the same problem but from other side. I want to filter out issues which were unresolved from 2017

project = myProject AND resolution was Unresolved ON startOfYear(2017) order by updated DESC

 

basically this JQL give me one issue, which was Resolved 03.04.2008 totally I have >3500 issues

Would anyone be able to help me with creating a query where I want to see all issues including closed ones as long as they were closed within the last 7 days.

I do not want to see issues where it was resolved more than 7 days ago.

Thank you

I found my answer:

(Project = XYZ AND resolution = Unresolved) OR (Project = XYZ AND resolutiondate >=-1w)

The answer is not the correct solution for your question.

Keep in mind that resolutiondate is not the same as the date the issue was closed. It depends on how your workflow is implemented.

status = closed and status was not Closed BEFORE startOfDay(-7)

combine this with resolution date if you need that as well

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,965 views 12 18
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot