Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I query Jira to search for all issues that have been resolved within a length of time from when it was created?

Tags:

jira

jql

For example, let's say I need to find all issues that were resolved within 1 week's time. I need something like:

resolved - created < '1w'

Another example:
Let's say I have 3 issues:

1) created 2 days ago, resolved 1 day ago.
2) created 5 days ago, resolved 4 days ago.
3) created 3 days ago, resolved 1 day ago.

I need a query that will return 1 and 2, but not 3. I need to query for issues that are created at some day X, and resolved <= day X+1.

like image 774
Marc Avatar asked Dec 02 '11 20:12

Marc


People also ask

Can you query history in Jira?

You can query the history of Jira issues and access the results effortlessly in a Matrix table. You can achieve this by leveraging the JQL history functions and the Extended JQL functionality of Issue Matrix for Jira.


2 Answers

You have all sorts of control with queries. For example, here is how I check for my tickets that are on hold that I have not updated in the last 5 days.

currentUser() AND status = "On Hold" AND updated <= -5d

Created in the last 5 days would be:

created >= -5d

Resolved in the last 7 days would be:

resolved >= -7d

OR

resolved >= -1w
like image 88
Jason Dean Avatar answered Sep 22 '22 08:09

Jason Dean


I don't know if it matters yet but I resolved it with dateCompare():

issueFunction in dateCompare("", "created > resolved -5d"))
like image 30
Lourenzoni Avatar answered Sep 18 '22 08:09

Lourenzoni