1

I am using new tfs aggregator from https://github.com/tfsaggregator/tfsaggregator/

Numeric fields are working great. But now i have a request to copy text field from from parent to child.

i wrote that rule

<rule name="FieldCopy"
      appliesTo="*">
<![CDATA[
    if (self.HasChildren())
    {
      foreach (var child in self.Children)
        {
            child["Title"] = self["Title"];
        }
    }
    ]]>

</rule>

But it dous not work. Where can i find any examples with child aggregations? Or what have i done wrong?

UPD: It works good with text fields like Title. But Fields with type FieldControl dont copying.

1 Answers1

2

I got it! All child or parent WITs must have changing field. If one of all will not have it changes will not be saved.

  • Correct, you can check whether a child has a certain field or wrap the assignment in a try/catch block. I'd recommend the first, as it's faster. – jessehouwing Jan 18 '17 at 15:03