Please help convert this to the new tfsaggregator policies

Jan 5, 2016 at 5:35 AM

I have the following old aggregator rule would like to convert it to the new policies format since we are upgrading our TFS to 2015 Update1
<!--Add the time from the task up to the parent--> <AggregatorItem operation="Sum" linkType="Parent" linkLevel="1" workItemType="Ticket">
<TargetItem name="Requirement Total Estimate"/>
 <SourceItem name="Developer Estimate"/>
Jan 5, 2016 at 10:50 PM

I just figured out myself hope this samples might help out other if they convert to the policy ruleset.

<?xml version="1.0" encoding="utf-8"?>
    <logging level="Diagnostic"/>
  <authentication autoImpersonate="false" />

<!-- Add the time from the task up to the parent -->
<rule name="Rollup" appliesTo="Ticket">

  if (self.HasParent())
  var parent = self.Parent;
  parent["Requirement Total Estimate"] = parent.Children.Sum(ticket => ticket.GetField<double>("Developer Estimate", 0d));

<policy name="DefaultPolicy">
    <collectionScope collections="*" />
    <ruleRef name="Rollup" />