How to sum Task and Sub-task Time Tracking under the Epic
Asked by Dave W:

We're using Jira Work Management on Cloud and we need to be able to see the sum of Task and sub-task Time Tracking against the Epic level.

We can see the sub-task time tracking against the task, but it's crucial that we also see it at Epic level.

Does anyone have any ideas without buying an add-on??

Thanks.


Answers:
author: Garudachalam.Acharyulu
body: well.. lot of members and articles suggests its not possible .. but its possible just by using JIRA automation rules. Ofcourse, had to experiment enough and there is not much help available in Google too.

create four separate rules for original estimate and timespent.

Rule-1: Original estimate is easier one.. create a rule to sum-up original estiamte of all subtasks at Story level (lot of articles available).

Rule-2: Create another rule to sum-up original estimate of all the Stories under an epic to Epic.. ![JIRA_Origina_estimate.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/202635iEA6365026D90CE4A/image-size/large?v=v2&px=999 "JIRA_Origina_estimate.JPG")

Rule-3: Just check-in the tickbox 'Include subtasks" in Time tracking at Story level, which by default ensures sum-up all subtasks time tracking to Story level (default function of JIRA)

Rule-4: Create another rule to sum-up timespent from Story level to Epic level.. this is tricky and most complex one ..

1. go to rule details - enable Allow rule trigger so that this rule runs after running above rules
2. I have created a schedule to update, indeed, you can change the trigger the way you wish..
3. attached is the screen shot to update worklog of timespent.. it will allow only 'add'. so, you need to read the current value of timespent at Epic and deduct it while summing up the entire timespent at story level.. so that it adds up and at the same time, it deducts the existing value to get desired output
4. it was divided by 3600 as my JIRA default value is in hrs.. check the default value and change the denominator accordingly. ![jira_timespent.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/202637i0C6EBE971E786872/image-size/large?v=v2&px=999 "jira_timespent.JPG")

comments: author: Saravanan Nallasamy
body: Hello, I am getting an error as below. There was an error executing a search during custom value definition when I follow your steps. Any help possible?


author: Darryl Lee
body: Actually though, I think you **should** be able to do this with Automation - if you create a Custom Field for "Logged Sum" that is read-only and modified by a rule.

<https://community.atlassian.com/t5/Automation-articles/How-to-sum-up-logged-hours-using-automation-in-Jira-Cloud/ba-p/1409115>

Although with all the discussion there, I'm not sure it's as easy as I'm making it sound. :-}

Paging [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313), did you ever figure out if it would work summing up fields from Stories based on {{fieldChange}} values?

comments: author: Bill Sheboy
body: Hi [@Darryl Lee](/t5/user/viewprofilepage/user-id/1365322)

No, I didn't, and...

It appears a few people got this to work from that linked post's information while others did not. The challenge I noted was when multiple fields change, you need to confirm which field you are summing from the changelog.

Anyway...rather than triggering on field changes, it may be more reliable/possible to use a scheduled trigger and get the data from the REST API as a source. I currently do not have a use case for this and am not actively working on it.

Best regards,  
Bill


author: Kevin Johnson
body: Hi Dave,

"It is not possible to achieve this feature using only JIRA inbuilt features"

This was a reply from Atlassian team that I have found. Also linking the same for you reference to other add-ons in that ticket. Hope this helps.

<https://community.atlassian.com/t5/Jira-questions/How-to-include-time-tracking-epic-and-story-and-task/qaq-p/1087001>

Regards,

Kevin


Tags: atl-gruland

time-tracking