Subtracting dates in Jira

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

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:

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.

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.

Export to Excel and do the calculation in Excel. That's your last option -

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!

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).

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Amir Kazemi
Posted an hour ago in Jira

We want to know what Jira Service Desk apps you're using!

Hi Community! My name is Amir and I’m on the Jira Service Desk product marketing team at Atlassian. Our team would love to understand how you’re leveraging our ecosystem for Jira Service Desk. Wha...

10 views 0 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