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

Marc picture Marc · Dec 2, 2011 · Viewed 51.4k times · Source

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.

Answer

Jason Dean picture Jason Dean · Dec 2, 2011

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