Has any one used TFS AGGREGATOR for implementing b

2019-09-11 02:17发布

问题:

  1. When any child link is set to ACTIVE Parent should transit from "Proposed" to "Active"
  2. If any child is active under the parent, the parent work item will not be set to "Closed" unless all child's are set to Closed or resolved.

回答1:

The first item is achievable with TFS Aggregator.

Here's an example configuration you could use:

<!--When any Tasks are In Progress set the parent (PBI) to In Progress -->
<AggregatorItem name="Update InProgress" operationType="String" linkType="Parent" linkLevel="1" workItemType="Task">
  <Mappings>
    <Mapping targetValue="In Progress" inclusive="Or">
      <SourceValue>In Progress</SourceValue>
    </Mapping>
  </Mappings>
  <TargetField name="State"/>
  <SourceField name="State"/>
</AggregatorItem>

For the second item, you could change the mapping to use inclusive="and" and try something similar. This won't prevent someone changing the state in the parent work item manually.