I have Storys & Tasks, some with time logged, some with Sub-Tasks which have time logged and sometimes a mix of both.
Now I am trying to add a calculated field on import from JIRA with the sum of logged time but I don’t know how to get the time logged within the subtasks. It seems, that iterating over the subtasks with
if(issue.fields.subtasks) {
var sizeSubtasks = issue.fields.subtasks.length;
for(var i = 0; i < sizeSubtasks; i++){
if(issue.fields.subtasks[i].fields.timetracking) {
if(issue.fields.subtasks[i].fields.timetracking.timeSpentSeconds) {
sumTimeSpentSeconds = sumTimeSpentSeconds + issue.fields.subtasks[i].fields.timetracking.timeSpentSeconds;
}
}
}
}
doesn’t have the timetracking part of the subtasks:
I know that in this situation I can sum up the logged time within eazyBI but how can I get to these information within calculatedfields?