Subtracting dates in Jira

Mike sirotin December 26, 2012

I need to subtract Created from Resolved to find Jira resolution lifetime in JQL. How can I do that? Also, is there a way to track life time of a particular Jira.

3 answers

1 vote
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 26, 2012

You can't do this in JQL. A solution might be to create a calculated field which stores the difference between the two dates and use JQL to search based on the calculated field.

You can either create the calculate field using a plugin or use some scripted fields like the one from Scriptrunner plugin: https://studio.plugins.atlassian.com/wiki/display/GRV/Scripted+Fields.

0 votes
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 26, 2012

Export to Excel and do the calculation in Excel. That's your last option - https://confluence.atlassian.com/display/JIRA/Exporting+Search+Results+to+Microsoft+Excel

Mike sirotin December 26, 2012

That's what we are doing now, and I would rather have a dashboard - will save me tons of grief and most importantly engineering time.

Thanks renjith!

Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 26, 2012

Not possible to talk to your admin and get these plugins installed? You can also do it outside of JIRA if you are okay with REST APIs to retrieve the JIRA issues and do the calculation in a simple script and generate a csv with the values (or just print on the screen).

0 votes
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 26, 2012

If you are just looking for information about the time in each status for issues, JIRA Suite Utilities will give you a new Transition tab in JIRA.

https://marketplace.atlassian.com/plugins/com.googlecode.jira-suite-utilities

https://studio.plugins.atlassian.com/wiki/display/JSUTIL/JIRA+Suite+Utilities+Issue+Transitions+Tab

Mike sirotin December 26, 2012

Thanks guys. I am not Jira admin, and per my understanding what you are proposing requires admin access. I was really hoping i can do this with JQL.

Suggest an answer

Log in or Sign up to answer