Classification

The Classification plug-in controls the iterations and structure of a team project. The plug-in name is Microsoft.ProjectCreationWizard.Classification. The Classication XML file is named Classification.xml and is located in the Classification folder in the process template folder hierarchy. You can change the XML file and folder name if necessary.

In the XML file, specify one or more tasks and their dependencies. In general, you only need one task to specify all the iterations and nodes required for a team project. For an example of a task that specifies iterations, see the Classifications.xml file in the MSF for Agile Software Development process template.

Note

Team Foundation Server does not include a mechanism for the deployment of client-side plug-ins, policies, or other modifications. If you want to deploy plug-ins, policies, or other modifications to Team Explorer, you must use your own distribution and installation program.

Iterations

The iterations you define for a process determine how many times the team will repeat a particular set of major activities (such as plan, develop, test). Iterations affect work item queries and reports because iterations are used to group work items. For example, a team member can query for all bug work items from iteration 1. Iterations appear in the System.IterationPath field for any work items that reference this field.

You must specify the root node for iterations by using the following syntax.

<Node StructureType="ProjectLifecycle" Name="Iteration" >

Then specify zero or more children nodes for as many iterations as you need for your process. Use the Node element to specify each iteration. You must set the StructureType attribute to ProjectLifecycle.

The following example shows how to specify four iterations: Milestone 1, Milestone 2, Beta, and RTM.

<?xml version="1.0" encoding="utf-8" ?>
<tasks>
   <task
      id="UploadStructure"
      name="Creating project structure"
      plugin="Microsoft.ProjectCreationWizard.Classification"
      completionMessage="Team project structure created.">
      <taskXml>
         <Nodes>
            <Node StructureType="ProjectLifecycle" Name="Iteration" >
               <Children>
                  <Node StructureType="ProjectLifecycle" Name="Milestone 1"></Node>
                  <Node StructureType="ProjectLifecycle" Name="Milestone 2"></Node>
                  <Node StructureType="ProjectLifecycle" Name="Beta"></Node>
                  <Node StructureType="ProjectLifecycle" Name="RTM"></Node>
               </Children>
            </Node>
         </Nodes>
      </taskXml>
   </task>
</tasks>

Areas

Areas represent key groups on the team project. For example, a team could organize the product work such that there is a client area, server area, and extensibility area. Areas are used to group work items for queries and reports. Areas appear in the System.AreaPath field for any work items that reference this field.

You must specify the root node of areas by using the following syntax.

<Node StructureType="ProjectModelHierarchy" Name="Area" >

Then specify zero or more children nodes for as many areas as you need for your process. Use the Node element to specify each area. You must set the StructureType attribute to ProjectModelHierarchy.

<Node StructureType="ProjectModelHierarchy" Name="" ></Node>

The following example shows how to specify two areas, Client and Server.

<?xml version="1.0" encoding="utf-8" ?>
<tasks>
   <task
      id="UploadStructure"
      name="Creating project structure"
      plugin="Microsoft.ProjectCreationWizard.Classification"
      completionMessage="Portfolio project structure created.">
      <taskXml>
         <Nodes>
            <Node StructureType="ProjectModelHierarchy" Name="Teams" >
               <Children>
                  <Node StructureType="ProjectModelHierarchy" Name="Client"></Node>
                  <Node StructureType="ProjectModelHierarchy" Name="Server"></Node>
               </Children>
            </Node>
         </Nodes>
      </taskXml>
   </task>
</tasks>

Note

If you modify a process template's iterations or areas, make sure that you do not break any work item instance tasks in workitems.xml. Work item instances may reference specific iterations or areas.

Specifying Microsoft Project Field Map Properties

The Classification plug-in also defines field mappings between work item types and Microsoft Project. Unlike Microsoft Excel, Microsoft Project uses a limited set of columns that include predefined columns such as Task Name and custom fields. When a user publishes or refreshes work item data in a Microsoft Project file, the field map is used to determine which fields in the work item database match the columns in Microsoft Project.

You can customize the mappings, for example, to support a new field that you created, or to map fields to predefined columns instead of custom columns. For complete documentation on the Microsoft Project field mapping file, see The Microsoft Project Field Mapping File.

The field map is located in an XML file named FileMapping.xml. Classification.xml must contain an entry that references the FileMapping.xml file as shown in the following example.

<properties>
   <property name="MSPROJ" 
             value="Classification\FileMapping.xml" 
             isFile="true" />
</properties>

In FileMapping.xml, specify mapped fields by using the Mapping element.

<Mappings>
   <Mapping WorkItemTrackingFieldReferenceName="System.Id" 
            ProjectField=""
            ProjectName=""
         ProjectUnits=""
         PublishOnly=""/>
</Mappings>

The following table describes the attributes for the Mapping element.

Attribute Description

WorkItemTrackingFieldReferenceName

Required. Specifies the reference name of a work item type field.

ProjectField

Required. Specifies the name of a Microsoft Project column. Specify predefined column names by prefixing "pj" to the name, such as pjTaskName for the Task Name column. Specify custom fields as pjTaskText followed by a number, such as pjTaskText11.

ProjectName

Optional. Specifies the name to display as the column name to the user. If this attribute is not specified, the work item type field name is used.

ProjectName

Optional. Specifies the name to display as the column name to the user. If this attribute is not specified, the work item type field name is used.

ProjectUnits

Optional. Specifies the type of units to use when you map a field type to Microsoft Project. Valid values are pjMinute, pjHour, pjDay, pjWeek, and pjMonthUnit.

PublishOnly

Optional. If set to true, indicates that the field is published to the work item database, but not refreshed. This value is typically used for calculated fields that should not be updated in Team Explorer. If set to no, indicates that the field is both published and refreshed. The default value when not specified is no.

The following example shows how the MSF for Agile Software Development process template maps work item fields to Microsoft Project.

<?xml version="1.0" encoding="utf-8"?>
<MSProject>
   <Mappings>
      <Mapping WorkItemTrackingFieldReferenceName="System.Id" ProjectField="pjTaskText10" ProjectName="Work Item ID"/>
      <Mapping WorkItemTrackingFieldReferenceName="System.Title" ProjectField="pjTaskName" />
      <Mapping WorkItemTrackingFieldReferenceName="System.WorkItemType" ProjectField="pjTaskText24" />
      <Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Common.Discipline" ProjectField="pjTaskText17" />
      <Mapping WorkItemTrackingFieldReferenceName="System.AssignedTo" ProjectField="pjTaskResourceNames" />
      <Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Scheduling.CompletedWork" ProjectField="pjTaskActualWork" ProjectUnits="pjHour"/>
      <Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Scheduling.RemainingWork" ProjectField="pjTaskRemainingWork" ProjectUnits="pjHour"/>
      <Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Scheduling.BaselineWork" ProjectField="pjTaskBaselineWork" ProjectUnits="pjHour"/>
      <Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Scheduling.StartDate" ProjectField="pjTaskStart" PublishOnly="true"/>
      <Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Scheduling.FinishDate" ProjectField="pjTaskFinish"  PublishOnly="true"/>
      <Mapping WorkItemTrackingFieldReferenceName="System.State" ProjectField="pjTaskText13" />
      <Mapping WorkItemTrackingFieldReferenceName="System.Reason" ProjectField="pjTaskText14" />
      <Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Common.Rank" ProjectField="pjTaskText16" />
      <Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Common.Issue" ProjectField="pjTaskText15" />
      <Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Common.ExitCriteria" ProjectField="pjTaskText20" />
      <Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Common.QualityOfServiceType" ProjectField="pjTaskText21" />
      <Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Common.Priority" ProjectField="pjTaskText19" ProjectName="Work Item Priority" />
      <Mapping WorkItemTrackingFieldReferenceName="System.AreaPath" ProjectField="pjTaskOutlineCode9" />
      <Mapping WorkItemTrackingFieldReferenceName="System.IterationPath" ProjectField="pjTaskOutlineCode10" />
      <Mapping WorkItemTrackingFieldReferenceName="System.Rev" ProjectField="pjTaskText23" />
      <ContextField WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Scheduling.TaskHierarchy"/>
      <LinksField   ProjectField="pjTaskText26" />
      <SyncField   ProjectField="pjTaskText25" />
   </Mappings>
</MSProject>

There are three special columns in the mapping field list. One is the synchronization field that specifies which column serves as the synchronization field. The synchronization field is titled "Publish and Refresh" and allows the user to indicate if a task row is published or refreshed only.

Use the following XML syntax to specify which column maps to the synchronization field. The ProjectField attribute must be set to a valid Microsoft Project column.

<SyncField ProjectField="" />

The other special field is the links and attachments field. The links and attachments column allows users to indicate if there are links or attachments for a particular task row.

Use the following XML syntax to specify which column maps to the links and attachments field. The ProjectField attribute must be set to a valid Microsoft Project column.

<LinksField ProjectField="" />

The last special field is the context field. The context field is a work item type field that displays information about a task's hierarchical relationship to summary tasks. The context field is displayed in Team Explorer so that users who are not using Microsoft Project can still see what summary tasks a subtask belongs to.

Use the following XML syntax to specify which work item type field is the context field. The ContextField element is used to specify a context field. The WorkItemTrackingFieldReferenceName attribute must be set to a valid reference name of an existing work item type field.

<ContextField WorkItemTrackingFieldReferenceName="" />

See Also

Tasks

How to: Verify Classification Changes

Concepts

Windows SharePoint Services [Team Foundation Server]
Version Control [Team Foundation Server]
Reports
Groups and Permissions
The Microsoft Project Field Mapping File

Other Resources

Work Item Tracking