How to sum Remaining and Logged time for JIRA dashboard (groovy, Scipt Fields)?

Vladimír Rahm October 12, 2014

Hi,

I know, how to sum these (remaining + logged time) for single issue:

remaining = issue.getEstimate()

loggedTime = issue.getTimeSpent()

 

But how to sum it, when I need to include subTasks and structure-subIssues? Any help is welcome.

 

Thanks

1 answer

1 accepted

1 vote
Answer accepted
JamieA
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 13, 2014

Both of those values are milliseconds, so you can just sum them

Subtasks is just iterating each subtask and adding.

Getting structure sub-issues is more complex, there is an example of how to query structures here: https://jamieechlin.atlassian.net/wiki/display/GRV/Scripting+Other+Plugins#ScriptingOtherPlugins-AllDescendantsMustbeResolvedCondition

But it's the same deal, get the issues and sum the two values.

Suggest an answer

Log in or Sign up to answer