Sum the value of two child Work Items

Mar 7, 2013 at 10:37 AM
Hello there,

To the creator. Incredible job with the TFSAggregator :)

Second, I have a little question as the title says, I'm trying to add the same type of value from two childs into his parent.
<AggregatorItem operation="Sum" linkType="Parent" linkLevel="1" workItemType="wti1">
      <TargetItem name="refname"/>
      <SourceItem name="refname"/>
  </AggregatorItem>

<AggregatorItem operation="Sum" linkType="Parent" linkLevel="1" workItemType="wti2">
      <TargetItem name="refname"/>
      <SourceItem name="refname"/>
  </AggregatorItem>
The current behavior with the above snippet of code its that the Parent will only add the value from wti1. Can someone tell me how to add both values? Is it even possible?

Thanks in advance
Ricardo Guerreiro
Mar 7, 2013 at 3:10 PM
I've managed to find a workaround but it involved a less attractive way to do it.

I needed to create two secondary references on the parent ("refname2" and "refname_display") and pointed wti2 targetitem to refname2 and let wti1 with targetitem refname

I then presented visually refname_display and in the Aggregator.xml I did something like:
<AggregatorItem operation="Sum" linkType="Self" workItemType="wti_Parent">
      <TargetItem name="refname_display"/>
      <SourceItem name="refname"/>
      <SourceItem name="refname2"/>
  </AggregatorItem>
If there's a better way around this I'm all up for suggestions :).