time machine JQL query

I can find out how many critical bugs have been opened in the last month using a JQL query like

issuetype = Bug
AND priority = Critical
AND status in (Open, "In Progress", Reopened)
AND created >= 2012-02-13

If I want to compare this figure, with the corresponding figure from last year, a naiive attempt at getting last year's equivalent might be

issuetype = Bug
AND priority = Critical
AND status in (Open, "In Progress", Reopened)
AND created >= 2011-02-13
AND created < 2011-03-13

But of course this is completely wrong, because it will tell me how many critical bugs that were created between 2011-02-13 and 2011-03-13 currently have staus open, in progress, or reopened. What I want to know is how many of these bugs had such a status one year ago.

I don't know if the JIRA data model, allows such a query to be formulated, but if it does, I'd appreciate it if someone could show me how.

1 answer

This widget could not be displayed.
Thomas Schlegel Community Champion Mar 12, 2012

Hi,

you can use "status was"

Best regards

Thomas

Thanks for the response. Would you mind showing exactly how to use this? Specifically, how do I specify the date that want to get the status for?

Thomas Schlegel Community Champion Mar 12, 2012

But if I think of it for a while, it is not necessary to ask for the status. The only relevant thing is, that the creation date is between 2011-02-13 and 2011-03-13. Every issue that is created then was in status "open", of course...

Thomas Schlegel Community Champion Mar 12, 2012

This should do it:

issuetype = Bug
AND priority = Critical
AND status was in (Open, "In Progress", Reopened)
AND created >= 2011-02-13
AND created < 2011-03-13

What I want to know is "on 2011-03-13 how many critical bugs created in the previous month have a status of Open / In Progress / Reopend on 2011-03-13. I don't think your query captures this, because it will wrongly include (for example) a bug that was created on 2011-03-01 and permanenty closed on 2011-03-02.

In other words, your query doesn't specify at what point in time the bug should have one of these statuses. I only want bugs that have one of these statuses on 2011-03-13 to be included.

That looks like exactly what I need - thanks a lot!

Thomas Schlegel Community Champion Mar 12, 2012

ok, now I think I understood...

Try that:

issuetype = Bug
AND priority = Critical
AND status was in (Open, "In Progress", Reopened) on 2011-03-13
AND created >= 2011-02-13
AND created < 2011-03-13

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 10 hours ago in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

30 views 1 2
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