Aggregation accross sibling work item types

Feb 17, 2014 at 9:05 PM
My shop has a situation where we often have bugs, change requests and even function requirements and tasks all as children of parent scenario requirements. Naturally, we wanted to aggregate completed work up to the scenario!

I coded up a simple mod that adds List<string> as a property to ConfigAggregatorItem.cs:
14 SiblingTypes = new List<string>(); 
27 /// <summary> 
28 /// The allowed other child work item types if ConfigLinkTypeEnum is Parent. Default value is the WorkItemType. Use "All" for all work item types 
29 /// </summary> 
30 public List<string> SiblingTypes { get; set; } 
Then populated from configuration with the following in TFSAggregatorSettings.cs:
53 foreach (var type in xmlAggItem.LoadAttribute("siblingType", aggItem.WorkItemType).Split(',')) 
54 { 
55     aggItem.SiblingTypes.Add(type.Trim()); 
56 } 
Finally, I filtered the work item type by the sibling type rather than the current work item type in WorkItemChangedEventHandler.cs:
157 if (!configAggregatorItemClosure.SiblingTypes.Contains("All")) 
158 { 
159     iterateFromParents.RemoveAll(x => !configAggregatorItemClosure.SiblingTypes.Contains(x.Type.Name)); 
160 }
I thought I would share as this helped our situation.
Mar 16, 2014 at 9:22 AM
This work perfectly,
Mar 17, 2014 at 4:05 PM
I am glad someone else is able to use it. I know here, we love the TFS Aggregator even more now!
Mar 17, 2014 at 4:16 PM

Anyone ever have any luck doing addition then subtraction on fields?