Area and Iteration fields and field constraints
Hello,
we are busy editing work item types (fields, states and transitions,... ) for our own use. We edit the process templates with Process Template Editor Tool (Imaginet Resources).
In one problem we ran: It seems not possible to add field constraints to the fields Area Path and Iteration Path (TreePath data type).
We want mark these fields as Required and preselect default values. Every time I try to add a constraint to such a field, I get an error: e.g. "TF26062: Rule "<Required>" is not supported for the field System.Area.Path."
What is the reason for that behavior?
Is there an other possibility to add such constraints and default values?
Thanks in Advance
Rolf
Areas and Iterations are actually hierarchies defined outside work item tracking, and can be used to organize tests as well as work items. They're treated as special fields in work item tracking. Check out Using System Fields in the SDK doc Authoring Work Item Types.
SDK: http://msdn.microsoft.com/vstudio/extend.
If you want add selected values in "Area/Interation" field, you can't set the valuse in the work item template.
1.Select your team project name in Team Explore.
2.Click "Team -> Team Project Settings -> Areas and Iterations".
Then you can set the valuse you want set into "Area/Interation" field.
If we are only concerned with ensuring that the iteration path is not set to the project root, is there any way to write the WIT in such a way that would be generic enough to apply to multiple team projects? Would this work?
<WHEN field="System.IterationPath" value="System.TeamProject">
Unfortunately, no. This relies upon the System.IterationID field and that value changes for each project and the value must be the actual ID (number). So if you wanted to use the same WIT for multiple projects you would need to change the value specified for System.Iteration
Code Snippet
<WHEN field="System.IterationId" value="10">
<COPY from="value" value="INVALID_Project Root" />
</WHEN>
For example, the value for the Root Node Path in Project A might be "10" and for Project B "45".