Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Why does the "Sum of Time Spent" not work for Epics?

Mykenna Cepek Community Leader Dec 08, 2020

Time logged to issues in Jira is aggregated in the "Time Spent" and "Sum of Time Spent" (aka "sigma Time Spent") values:

  • The "Time Spent" value totals all time logged to a specific issue.
  • The "Sum of Time Spent" totals all time logged for a specific issue and any child issues -- EXCEPT for Epics. Why?

For teams and companies that use Time Tracking in Jira, and Time Logging to track effort (sometimes even to support hourly client billing), this is really important data.

The basic Jira issue hierarchy (Epic - Story - Subtask) is helpful to break down work, assign to different team members.

Unfortunately, logged time aggregation across the issue hierarchy is not consistent. Why?

_ _ _ _ _ _ _ _ _ _ _ _ _

Fee free to verify this in your Jira instance. Use this JQL search:

type=epic and timespent != 0

And in the results, show these columns:

  • Time Spent
  • Sum of Time Spent

You will see that these two values always match, even if the Epic has child issues (Stories, Tasks, etc) with logged time.

In other words, "Sum of Time Spent" for Epics does not actually aggregate down the issue hierarchy. It computes the exact same value as "Time Spent" for Epics.

For bonus points, you can add "Remaining Estimate" and see that the "Sum of Remaining Estimate" acts the same way -- not aggregating for Epics.

_ _ _ _ _ _ _ _ _ _ _ _ _

To verify that Jira actually CAN aggregate logged time down the issue hierarchy, change your search JQL to this:

type=story and timespent != 0 order by subtasks

Assuming you have some Subtasks with time logged on them, you will see that the "Sum of Time Spent" column for those Stories will be larger than the "Time Spent" column. The "Sum" field properly aggregates time logged to child issues -- for Stories-level issues.

_ _ _ _ _ _ _ _ _ _ _ _ _

My question again is: why doesn't "Sum of Time Spent" work as expected for Epics?

Note, I'm very much NOT interested in third-party add-ons to work around this. I want to know why this native functionality appears to be broken.

1 answer

Hey @Mykenna Cepek 

I happened to stumble across your question and very much understand your frustration here. It seems unnaturally that the sum of time spent for an epic does not include times spent by other issues that belong to it.

I believe this is due to the field summarizing the value for the currently open issue, and the subtasks related to it. But it does not include issues that are associated in any other way, e.g. an epic - story relationship or an initiative - epic relationship.

Of course, there are tons of Apps that can solve this matter, but if you create a subtask for your epics and log time on them, you will see that the sum actually differs.

Long example

We have an Epic that we plan to slice and give to our team. The team however rates it with an estimate of 40 days, stating that the contents of this epic are simply too difficult to grasp.

Taking a look at our epic we will notice the following:

  • Original Estimate: 40 days
  • Σ Original Estimate: 40 days

As a result, we decide to create a couple of subtasks that help us understand the benefits and dependencies that this Epic is likely to bring, and the contents that belong to it. A dev is going to aid us and estimating the subtasks, we get an estimate of 3d for them.

Taking another look at our Epic, we will now see the following:

Taking a look at our epic we will notice the following:

  • Original Estimate: 40 days
  • Σ Original Estimate: 43 days

After spending those three days, we are able to better explain our epic to the team, and they decide to give it a rating of 13d. When we now slice the epic down to stories, each of them is receiving a seperate estimation that somehow adds up to 13, like 5, 5, 2, 1.

Now taking a look at our epic for the third time, we will see the following:

  • Original Estimate: 13 days
  • Σ Original Estimate: 16 days

The three estimated days from the subtasks are added, the stories however are not. And the same behavior applies in your case with the time spent. Elseway the epic would seem to be double of its actual size.

I know this answer may not be very satisfying, but I hope to have spread some understanding to how these fields are designed to work. If you require a solution, then I think the Automation capabilities within Jira may be sufficient to calculate the values for you.

Cheers,

Andrej  

Mykenna Cepek Community Leader Nov 11, 2021

Hi @Andrej Freeze _ greenique. I'm rather confused by what you wrote here.

The main problem I'm having is that Jira doesn't natively support SubTasks under Epics very well. Examples:

  • Within an Epic, using "Create issue in epic" does not offer the SubTask issue type as an option (even if the project allows for that issue type).
  • When using the "Create" button, you cannot create a SubTask issue (and then, say, associate it with a "parent epic").
  • SubTasks under an Epic must be in the same Project as the Epic (whereas Story-level issues under an Epic can be in any Project).

The only way I've seen to create a SubTask under an Epic is to move a SubTask that is already under another Story-level issue to instead have an Epic as the parent. That's pretty inconvenient.

In all the many organizations and teams I've worked with that use Jira, not one has ever used SubTasks under Epics. It's a curiosity, but I can't see it as practical at all.

Since I've only every had a SubTask under an Epic accidentally, I was surprised to see that an Epic does clearly list Subtasks in their own sections after the listing of Story-level issues in the epic. So there is that.

Your use of them was interesting to learn about. It sounds like you use SubTasks under an Epic to help "spike" on the Epic effort, and then use Story-level issues as usual under the Epic to track the remaining work. I can see how the accumulation of the SubTask estimates to the Epic would be helpful (unaffected by the Stories).

However, I'm very curious how you actually create those SubTasks under your Epic. 

Mykenna Cepek Community Leader Nov 11, 2021

Also, you wrote:

I think the Automation capabilities within Jira may be sufficient to calculate the values for you

Actually, no. Jira Automation cannot calculate something like a total Story Points or Original Estimate value for an Epic from the Story-level child issues.

I'm pretty outspoken here in the Atlassian Community about how Automation is currently incapable of doing this (here is one of my rants). The problems include how variables are scoped in Automation, and how looping branches are multi-threaded and non-deterministic for such a use case.

I see... most of the time I am still working on server and data center environments. Using sub-tasks in the matter I like to do certainly works there but testing my proposed solution in cloud leaves me baffled and ending up with the same situation you are facing.

I guess as part of the redesign the button was simply removed but taking a look at the three dot menu, it used to be right next to "convert to subtask". 

Still, providing some details on how the aggregation of sums works hopefully gave you some insights and I guess the current behavior is simply historical. It's not unlikely that Atlassian is not even aware of this matter.

For the other part, I'll make sure to check out the linked entry :)

Cheers,

Andrej

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Software

👋 Looking for 15-20 volunteers to test Atlassian training content

Hi everyone! Are you interested in beta testing Atlassian University’s newest (unreleased!) training course? We’re looking for 15-20 volunteers to test our newest training course, Basic reporting...

475 views 19 23
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you