2

TFS Web-client provides a "board" view under the backlog tab which shows the sum of Remaining work for a User Story based on the Sum of Remaining Work for it's child tasks.

TFS Web-client View with Parent Summation of Hours

I have also tried exporting to Excel and using a Pivot table, but there are no obvious links between the work items (as far as I can tell).

I saw this question but I can't tell if that is the same idea.

Also, this item might be similar, but no responses were received yet.

Can it be done out-of-the-box in Visual Studio TFS?

Does it require coding?

Are there plugins available? I've looked at TFSAggregator on Github and that might work but I'd like to avoid server-side plugins if possible.

Community
  • 1
  • 1
Sam
  • 487
  • 1
  • 10
  • 25

3 Answers3

1

One of the many uses of TFS Aggregator... it is even one of their sample use cases!

Example Uses

  • Update the state of a Bug, PBI (or any parent) to "In Progress" when a child gets moved to "In Progress"
  • Update the state of a Bug, PBI (or any parent) to "Done" when all children get moved to "Done" or "Removed"
  • Update the "Work Remaining" on a Bug, PBI, etc with the sum of all the Task's "Work Remaining".
  • Update the "Work Remaining" on a Sprint with the sum of all the "Work Remaining" of its grandchildren (i.e. tasks of the PBIs and Bugs in the Sprint).
  • Sum up totals on a single work item (i.e. Dev Estimate + Test Estimate = Total Estimate)
shA.t
  • 16,580
  • 5
  • 54
  • 111
felickz
  • 4,292
  • 3
  • 33
  • 37
0

You can rollup estimated and actual work using Project. Because Microsoft Project has a scheduling engine, it automatically will generate a rollup of summary tasks. Rollup provides summed values of select fields for all child work items of a parent. https://msdn.microsoft.com/en-us/library/dn769080(v=vs.140).aspx

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
0

I've been able to do this, however there is an issue when a Task's State value is set to "Removed", the rollup values should not be calculated for that Task. In the policy file, I've got the if condition like so:

    <rule name="RollupTasks" appliesTo="Task"><![CDATA[
    string wfState = (string) self.Fields["State"].Value;
    if (wfState="Removed" && self.HasParent()) ...

But that didn't work. I've also tried:

    <rule name="RollupTasks" appliesTo="Task"><![CDATA[
    if (self.HasParent() && self[System.State]="Removed") ...

..but this doesn't seem to work. Am I close?

pbkac
  • 39
  • 7
  • Sounds like a possibility but editing the policy file might be a challenge. Is the policy file on the server or is it editable on the page? – Sam Sep 01 '16 at 16:33
  • 1
    You should use inequality (`!=`) to skip the Removed state. – Giulio Vian Mar 04 '17 at 18:28
  • @SammyB: Policy file resides on the server. – pbkac May 19 '17 at 03:58
  • @GiulioVian: So if we go with the second code block up there, you're answer got me to the right one (I think). I do want the `[System.State]="Removed"` because that together with `sef.HasParent` gives me the linked User Story, _but_ - I should be using `parent.[System.State]`, not `self.[System.State]`. Pretty silly mistake, but is my assumption correct? I will go and test this out next chance I get and report back. Thank you! – pbkac May 19 '17 at 04:08
  • 1
    To aggregate a children value to the parent skipping some children you must have a test to avoid unnecessary computation -- this is the `if (self.HasParent() && ((string)self["System.State"])!="Removed")` test; but you have also to skip aggregating unwanted children e.g. `var sum = self.Parent.Chilldren.Where(c => ((string)c["System.State"])!="Removed").Sum(c => c.GetField("`field`",0.0);` – Giulio Vian May 19 '17 at 18:51
  • Thanks Giulio -- hadn't considered that. Unfortunately this item has been deferred so I don't have any results yet. When and if I get them, I'll post. – pbkac Aug 03 '17 at 15:13