Is it possible to add up all the days/hours from sub-tasks to parent issue?

Gil
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.
April 16, 2019

To be clear, I'm not trying to use this for velocity charts.

We estimate on story points for stories and the sub-tasks we estimate with days/hours.

What I'd like to do is to add all the days/hours from all the sub-tasks and add them the story's 'time spent' field/'log work'.

This is just to show how many days it took to complete a story.

I use automation for jira and automated log work for jira, and I wasn't successful in adding the subtasks time spent values to the story.

Is it even possible?

1 answer

0 votes
Iago Docando
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.
April 16, 2019

If you are willing to go into scripting territory... I programmed a very simple script to do something similar but with the original estimate instead of the time spent. You can sure use it reference the field you need

//estimate expressed in milis
//result expressed in hours and stored in a custom field number i = 0; number temp = (number)estimate/3600000; //estimación de la tarea //iterate every subtask within parent issue while (i < size(subtasks(key))){ temp = temp + (number)subtasks(key)[i].estimate/3600000; i = i + 1; } customfield_11608 = (number)temp;

 Hope it helps :)

Gil
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.
April 16, 2019

Thank you.

so you are copying the result to the original estimate?

Are you overwriting the original value there?

Iago Docando
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.
April 16, 2019

No, no, no... what that little script does is add into a custom field the estimate of the issue and the estimates of each one of its children. 

You want to do the same but instead of the estimate add the time spent, right? If so, you'll have to use not "estimate" but "timeSpent" or "spent" or whatever variable you need to use. It's been a while and I don't have the name of the variables in mind right now.

Feel free to change anything you need.

Cheers.

Gil
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.
April 16, 2019

Alright :)

 

Thank you.

I think I also need to sort my head with Time Estimates vs. Time Spent.

Iago Docando
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.
April 16, 2019

well...

Time spent is the field where you report the actual time you needed to complete a task, AFTER the fact.

Time estimate is something you calculate BEFORE starting progress on a task, mainly so you can (once you finished it) compare that estimate to the actual time spent and see if there are major differences. Hopefully In time your estimates get better and better and you can make accurate predictions on how long you'll need to perform a certain task. 

Also could be used as a decission making input in order to decide what task to take from a pool of tasks (could one among many other factors to considerate).

Gil
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.
April 17, 2019

Thank you.

I think I got confused with the Log Work field vs. Time Estimate/Time Spent.

The reporting about this is something I'm just beginning to learn.

Catherine Chang
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 11, 2020

Hi there! I'm the PM on Jira Cloud for Google Sheets, and we're working to make this easy. Check out this post to see how you can import all of your worklog data into a spreadsheet with just a few clicks! 

Like Iago Docando likes this
Iago Docando
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.
February 12, 2020

This seems nice, @Catherine Chang . It saves you the need to search in Jira, then export, then load the export to your spread sheet.

If I worked extensively with spread sheets where my data comes from jira I would definitely give this a try. Is it just for the cloud version, though? I'm running my own server.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events