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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great, can you mark my answer as correct, by clicking the check mark ;-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks.. working fine.. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
-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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found my answer:
(Project = XYZ AND resolution = Unresolved) OR (Project = XYZ AND resolutiondate >=-1w)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I also used this querry and it produces exactly what I wanted:
project = GVUKSUP AND resolved >= startOfDay(-6d) and resolution != Unresolved ORDER BY resolved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe they were resolved then reopened? Or you have a resolution value called "Unresolved"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Resolved and then reopend was my first thought as well, but the value of resolved would be emptied again
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
They are the same, one is an alias for the other
https://confluence.atlassian.com/display/JIRA/Advanced+Searching
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.