How can I deducted the remaining time of a parent issue from its subtasks worklog

To save time of planning meeting we would like to estimate time only for the user stories & during sprint running we will create subtasks & log works for subtasks. We expect that the remaining time display on a parent time will be reduced whenever there are any worklog on its subtasks. Is there anywau that we can configure jira to behave that way? Thanks a lot!

1 answer

You should have the option to "include sub-tasks" in the Time Tracking section of an issue. For example, I create a Story without an estimate. No time tracking section appears. Then, I create five sub-tasks and give each an estimate of 8h (total of 40h). Let's then say I've finished two of them, spending a total of 8h on each (total of 16h logged). The Time Tracking section in the parent Story would then look like this:

time_track_with_subtasks.PNG

You should see that there's an option to "include sub-tasks" - unchecking this box will only show you the estimate for the Story if you ever input that into the Story's fields.

You can also see this information in the Issue Navigator using the ∑ Original Estimate, ∑ Remaining Estimate, and ∑ Time Spent columns if you have sub-tasks with estimates.

Alex, currently it does not work like this.

If you log work against a subtask, it ADDs that work to the parent's "Estimated" field, and does NOT subtract from the parent's "Remaining" field.  It does correctly update "Logged" field.

I logged 1w against a subtasks and this is how it was reflected in the parent

Before logging:

work1.PNG

After logging:

work2.PNG

The estimated bar increased but not the value (why!?), "Remaining" remains untouched, and "Logged" is updated as expected.

Extra info: I did not supply an "estimate" to the subtask, simply directly selected "log work" either from the "More" dropdown or the "cog" icon next to the issue in the subtask list on the parent task.  Everything else I've read indicates an estimate on the subtask will be added to the parent task, which is not desired in how we track things.

The only workaround I've found is to tell my workers to log directly against the Parent task and reference the subtask worked in the log. Nobody likes this.

Is there some configuration setting I'm missing somewhere?

Thanks for any info.

Alex Christensen Community Champion May 09, 2018

Based on the screenshots and info you provided, here's what I think is happening in this situation, @mike:

  • The Original Estimate was filled out on the parent issue.
  • The Original Estimate was not filled out on any sub-tasks.
  • Users are logging work on the sub-tasks.

When you check "include sub-tasks," all of the bars add both the Estimates you've entered on the parent AND the sub-tasks. Let's say I did the following:

  • On the parent, I entered an Original Estimate of 2h.
  • On the two sub-tasks for this parent, I entered an Original Estimate of 2h on each (so a total of 4h).

If I check "include sub-tasks" on the parent, the blue Estimated bar will show 6h, as this includes the estimates from the parent AND its sub-tasks. Technically, you have the ability to log work on both the parent and/or the sub-tasks, which is why I believe Jira works this way.

If the above is correct, you technically didn't fill out the Original Estimate on the sub-tasks. Logging work on the sub-tasks does not reduce the Remaining Estimate on the parent - in Jira's eyes, it's adding to the scope of the parent because you didn't put the estimate on the sub-task, so the Remaining Estimate on the parent remains unchanged. For your situation, I would recommend splitting up the original estimate from the parent into each of the sub-tasks, only logging time to the sub-tasks and not the parent.

Hope this helps!

So I just did some tests.

What you're saying, and what I'm seeing, is the ONLY way to have parent task "Remaining" be subtracted by subtask's "Logged" is if ONLY child tasks have the estimated times to them?

So you CAN'T actually have an overarching time amount for the parent task? UNLESS that's ALSO a task you'd do work against so as to track JUST THAT work?

So, what I see, is a WORK TRACKING SYSTEM that, in fact, DOES NOT LET YOU SUBDIVIDE YOUR TASKS AND TRACK THEIR TIME!!??

What a great product you have here.  Really.

if (include_subs)
{
int sum_child_task_logged;
foreach child_task in parent.children
{
sum_child_task_logged += child_task.logged;
}

parent.remaining -= sum_child_task_logged;
}

Like, seriously, how hard is this? 

Alex Christensen Community Champion May 09, 2018

I can totally understand where you're coming from - I'm not an employee of Atlassian and did not help build the tool, but I can speculate their philosophy behind why they implemented this the way they did.

In all of my personal use cases, work shouldn't actually be logged against the parent task, and estimates should be divided up between the sub-tasks for how long you think each sub-task is going to take you to complete. From my experience, this has given me a much more accurate picture of estimate to completion.

What you're looking to achieve is possible, but you'll just have to get more granular with entering estimates on each of the sub-tasks instead of just the parent task. Jira does let you subdivide your tasks and track the time on each, but you will need to explicitly state how long each of those sub-tasks is going to take you instead of saying, "I think this collection sub-tasks are going to take me a total of X amount of time." There's no way for Jira to know that one of those several sub-tasks could take you 1 day or 4 weeks unless you explicitly tell Jira this.

If you want to enter the estimate on the parent but still have sub-tasks, that would work fine, for sure. You'll just need to log the work on the parent task rather than the individual sub-tasks. This would basically be an approach of saying that "this task is going to take me X amount of time, but I also need to make sure I do these smaller tasks as part of this larger whole."

Hope my explanations help - there are several ways to use the tool to achieve what you want, but I think you may just need to adjust your approach to get to your desired end state.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

82 views 0 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you