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

[759 byte] By [rolfcerff] at [2008-1-25]
# 1

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.

AllenClarkMSFT at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...
# 2

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.

edwardzhou at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...
# 3
So are you saying that it is impossible to have it empty at first so users are required to pick the area that the task or bug belongs to.? For development shops with one TFS project (housing lots of applications not big enough to require their own portal) area path becomes a key piece of information to get right. Also shouldn't area path be defined as a dimension for reporting purposes.
dzimmy at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...
# 4
Yes, Area is a dimension in the warehouse. Also, you are correct that you can't add new areas directly in the work item form.
AllenClarkMSFT at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...
# 5

I've posted a workaround for validating/requiring Area & Iteration Paths in the Community Content section of http://msdn2.microsoft.com/en-us/library/ms181480(VS.80).aspx#CommunityContent

This will prevent users from using certain Area or Iteration nodes.

PaulChapmanMSFT at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...
# 6

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">

JasonD.Camp at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...
# 7

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".
PaulChapman-MSFT at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...

Visual Studio Team System

Site Classified