Created
January 15, 2016 12:41
-
-
Save tomkuijsten/edc59d2344525b6d74b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<AggregatorConfiguration> | |
<!-- Configure TFS Aggregator behavior. (Once, Optional) | |
- **debug**: turns on debugging options (Optional, default: False) | |
--> | |
<runtime debug="false"> | |
<!-- | |
TBD | |
--> | |
<rateLimiting interval="00:00:01.0" changes="5" /> | |
<!-- | |
The level of logging. (Optional) | |
* Critical | |
* Error | |
* Warning | |
* Information or Normal - default value | |
* Verbose | |
* Diagnostic. | |
--> | |
<logging level="Diagnostic" /> | |
<!-- | |
The language used to express the rules. (Optional) | |
Valid values are: | |
* CS,CSHARP,C# - default value | |
* VB,VB.NET,VBNET | |
* PS,POWERSHELL - *Experimental*! | |
--> | |
<script language="C#" /> | |
<!-- | |
autoImpersonate false (default) use the TFS Service account, true the user requesting. (Optional) | |
--> | |
<authentication autoImpersonate="false" /> | |
</runtime> | |
<rule name="AutoOpen" appliesTo="Task"> | |
<![CDATA[ | |
if (new[] {"In Progress", "Review", "To do"}.Contains((string)self["System.State"])) | |
{ | |
if(self.HasParent() && (string)self.Parent["System.State"] != "Committed") | |
{ | |
self.Parent.TransitionToState("Committed", "Auto Activated"); | |
} | |
} | |
]]> | |
</rule> | |
<rule name="AutoClose" appliesTo="Task"> | |
<![CDATA[ | |
if ((string)self["System.State"] == "Done" && self.HasParent() && ((string)self.Parent["System.State"]) != "Done") | |
{ | |
if (self.Parent.Children.All(child => new[] {"Removed", "Done"}.Contains((string)child["System.State"]))) | |
{ | |
self.Parent.TransitionToState("Done", "Auto done"); | |
} | |
} | |
]]> | |
</rule> | |
<!-- Represent a set of aggregation rules that apply to a particular scope. (Repeatable) | |
- **name**: The name of this policy. (Mandatory) | |
--> | |
<policy name="AutoOpenClose"> | |
<!-- Scope the policy to a list of collections. (Optional) | |
- **collections**: The TFS Collection to which the policy applies. (List, Mandatory) | |
'*' means any Collection | |
--> | |
<collectionScope collections="DefaultCollection" /> | |
<!-- Scope the policy to Team Projects using a particular Process Template. | |
- **name**: Name of Process Template matching. (Optional) | |
(Not working due to Microsoft not setting these values for on-premise installations) | |
- **typeId**: Process Template GUID to match. (Optional) | |
- **minVersion**: Minimum version for Process Template. (Optional) | |
- **maxVersion**: Minimum version for Process Template. (Optional) | |
--> | |
<templateScope name="Scrum" /> | |
<!-- Microsoft Visual Studio Scrum 2013.4 | |
<templateScope typeId="6B724908-EF14-45CF-84F8-768B5384DA45" minVersion="3" maxVersion="3" /> | |
--> | |
<!-- Scope the policy to listed Team Projects. | |
- **projects**: List of Team Project names. (List, Mandatory) | |
--> | |
<projectScope projects="SO" /> | |
<!-- Reference to a previously declared rule.--> | |
<ruleRef name="AutoOpen" /> | |
<ruleRef name="AutoClose" /> | |
</policy> | |
<!-- add more policies as needed --> | |
</AggregatorConfiguration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment