It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JQL Compare Dates - Created vs. Updated

Martin Schmid Jul 18, 2012

Hello,

is it possible to compare two dates (Created - Updated) with a JQL Query. I would like to know the average duration of an Issue!

Best regards,

Martin

4 answers

1 accepted

3 votes
Answer accepted
Renjith Pillai Jan 20, 2013

Average Duration of an Issue is available in "Average Time in Status" gadget.

And for getting days between dates, use script runner and add a scripted field which can get the difference between Created and Due dates.

def diff = new Timestamp(issue.getDueDate().getTime() - issue.getCreated().getTime()).getTime()
def days = (int)(diff/ (1000 * 60 * 60 * 24)); 
return days

Renjith Pillai Jan 20, 2013
Typo: need to do diff between custom fields that get updated using post functions. Or use issue history and get the statuses' transition date and give the difference.
1 vote
Jobin Kuruvilla [Go2Group] Community Leader Jul 18, 2012

You can't do this with a JQL query. Write a custom report or see if there are any existing ones in marketplace.

1 vote
Jens Kisters May 24, 2016

Script Runner has a date compare JQL Function

0 votes
BlueKai Support Jan 20, 2013

anybody find a good way to do this? We're trying to report stories that are late by comparing a due date with release date.

A custom field with that does the day difference would be great. Anybody have ideas?

thanks.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Jira

Try Jira Cloud for Outlook: Organize your work without leaving your inbox

Hi Atlassian community, My name is Max and I work on the product integration team at Atlassian. I am pleased to announce the early access program for the Jira Cloud add-in for Outlook. This add-in...

2,449 views 6 15
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you