Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Time spent

mallikarjun kalal August 5, 2015

Is it possible to calculate time as below equation in jira ?

Time = (Date that status was set to ‘In Progress’ - Date that status was set to ‘Open’ or Date Created)

I tried in script runner plugin with scripted field

import com.atlassian.core.util.DateUtils
DateUtils.getDurationString(((issue.getStatus("In Progress").getTime() - issue.getCreated().time) / 1000) as Long)
but i didn't find method to calculate time for particular status of an issue.

 

please help me
Thanks,
Arjun

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Mark McCormack (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.
October 5, 2015

There is a ScriptRunner document that covers how you might go about doing this as a Script Field.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 4, 2015

Correct, there isn't a function you can use.  You can do it, of course, but what you'll need to to is read the history of the issue for when the status was entered and left and extract the time between those two date/times (possibly many times if an issue looped back through the workflow)

0 votes
mallikarjun kalal August 6, 2015

any solution ?

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events