-
Notifications
You must be signed in to change notification settings - Fork 0
Policy Syntax
<?xml version="1.0" encoding="utf-8"?>
This is the basic beginning to an XML file. Do not change it.
<AggregatorConfiguration>
AggregatorConfiguration: The main node for all the configuration options. (Single)
<runtime debug="False">
runtime: Configure generic behavior. (Once, Optional)
- debug: turns on debugging options (Optional, default: False)
<rateLimiting interval="00:00:10.00" changes="10" />
rateLimiting: Define how Aggregator rejects incoming requests. (Once, Optional)
- interval: Timespan to validate. (Optional, default: 00:00:01.00)
- changes: Maximum number of changes in interval. (Optional, default: 5 )
Use RateLimiting.policy to test your configuration on a server.
<logging level="Diagnostic"/>
logging: Define logging behavior. (Once, Optional)
-
level: The level of logging. (Optional)
Valid values are:
CriticalErrorWarning-
InformationorNormal-- default value Verbose-
Diagnostic. See the Help page for more information: TFS Aggregator Troubleshooting
<script language="C#" />
script: Define script engine behavior. (Once, Optional)
-
language: The language used to express the rules. (Optional)
Valid values are:
-
CS,CSHARP,C#-- default value -
VB,VB.NET,VBNET -
PS,POWERSHELL-- Experimental!
-
<authentication autoImpersonate="true" />
authentication: Define authentication behavior. (Once, Optional)
-
autoImpersonate:
false(default) the TFS Service account,truethe user requesting. (Optional)
<rule name="Noop" appliesTo="Task,Bug" hasFields="System.Title,System.Description">
</rule>
rule: Represents a single aggregation rule. (Repeatable)
- name: The name of this aggregation rule. (Mandatory)
- appliesTo: The name of the work item type that this aggregation will target. (All: *, List, Optional, List separators: ,;)
- hasFields: The work item must have the listed fields for the rule to apply. (All: *, List, Optional, List separators: ,;)
-
content: the script to execute when the rule triggers. (Mandatory)
The
self($selfin PowerShell) variable contains the work item that triggered the plugin. Theself($selfin PowerShell) variable contains the work item that triggered the plugin.
We recommended using CDATA to wrap script code. See Scripting for additional details on Rules' code.
<policy name="DefaultPolicy">
policy: Represent a set of aggregation rules that apply to a particular scope. (Repeatable)
- name: The name of this policy. (Mandatory)
All scopes must match for the policy to apply (logical and).
<collectionScope collections="DefaultCollection" />
collectionScope: Scope the policy to a list of collections. (Optional)
- collections: The TFS Collection to which the policy applies. (All: *, List, Mandatory, List separators: ,;)
<templateScope name="Scrum" typeId="" minVersion="0.0" maxVersion="10.0" />
templateScope: Scope the policy to Team Projects using a particular Process Template. (Optional, Repeatable)
- name: Name of Process Template matching. (Mandatory, mutually exclusive with typeid)
- (Not working due to Microsoft not setting these values for on-premise installations)
- typeId: Process Template GUID to match. (Mandatory, mutually exclusive with name)
- minVersion: Minimum version for Process Template. (Optional)
- maxVersion: Minimum version for Process Template. (Optional)
templateScope requires that name or typeId must be present.
Download the Process Template and look for the metadata/version node in ProcessTemplate.xml file to see matching values.
<projectScope projects="Project1,Project2" />
projectScope: Scope the policy to listed Team Projects. (Optional)
- projects: List of Team Project names. (All: *, List, Mandatory, List separators: ,;)
<ruleRef name="Noop" />
ruleRef: Reference to a previously declared rule. (Repeatable)
- name: Name of existing Rule. (Required)
Rules apply in order.
Previous topic: Writing Rules and Policies Next topic: Scripting Rules