Field Mappings in Microsoft Project
You can customize how data is mapped between Office Project and Team Foundation Server by modifying the Office Project Field Mapping File. The mapping file associates the name of a work item tracking field, the WorkItemTrackingFieldReferenceName attribute, with an Office Project field name, the ProjectField attribute. Before you change the field mappings defined in the Office Project Field Mapping File, you should review the information provided later in this topic to understand how Team Foundation copies data from Office Project to the work item tracking database.
In this topic
Calculated Fields
Mapping Field Types
Office Project Names
For more information about how to use Office Project field names, see Change How Fields are Mapped to Microsoft Project.
Important
The supported set of Office Project field names may be different for different versions of Office Project.
Calculated Fields
Generally, you do not want to refresh calculated fields from the work item database. For example, start and finish dates are typically calculated based on task duration and dependencies. If a team member were to change the start date of a task in Team Explorer, the change could introduce errors in Office Project when the field is refreshed. Therefore you can configure calculated fields so that they are publish only; meaning Office Project will publish changes for those fields to the work item database, but not update them. For more information about how to configure fields as publish only, see Change How Fields are Mapped to Microsoft Project.
You can also prevent team members from changing calculated field values in Team Explorer by using the READONLY attribute in the work item form definition. For more information about the READONLY attribute, see All FIELD XML Elements Reference.
Note
The Microsoft Solutions Framework (MSF) for Agile Software Development and MSF for CMMI Process Improvement process templates already configure the start and finish dates as publish only mappings, and read-only in Team Explorer.
Mapping Field Types
When Team Foundation publishes tasks from Office Project, the field data is copied from Office Project to the work item database. Also, when tasks are refreshed, the field data is copied from the work item database to Office Project. For the field data to be copied correctly, the field type in the work item database, and the field type in Office Project must be compatible. The following table lists which Office Project field types are compatible with the individual work item field types:
Work Item Field Type |
Microsoft Project Field Type |
---|---|
DateTime |
Datetime. |
Double |
Work, units, percentages, fractions, and any field type with a range of ±5.0 × 10−324 to ±1.7 × 10308. |
History |
Not Supported. |
Html |
Not Supported. |
Integer |
Work, units, numbers, and any field type with a range of -2,147,483,648 to 2,147,483,647. |
PlainText |
Not Supported. |
String |
Text (maximum of 255 characters.)
Important
Office Project does not populate the Resource Names field list with names of team members. Therefore, you must manually add names to the list. When you assign a work item to a resource in Office Project, you should specify the resource by its display name from Active Directory Domain Services (AD DS) or the Address Book. If you assign a work item to a resource by alias or other shortened form of the name, you introduce an inconsistency that can cause validation errors.
|
TreePath |
Custom outline codes. |
For more information about work item field types, see Working with Work Item Fields. For more information about Office Project field types, see the help about the pjField constant in the Microsoft Office 2007 Software Development Kit. This kit can be accessed from the Microsoft Web site: Project 2007 SDK: Software Development Kit.
Office Project Field Names
In Office Project you can map any field name that starts with pjtask. For example, you can map pjTaskText10 to a String field in Team Foundation. These field names are used in the ProjectField attribute when you specify which work item field maps to an Office Project field. For a complete list of the Office Project field names, see the help about the pjField constant in the Microsoft Office 2003 Software Development Kit.
Note
If you are using Office Project Server, there are additional fields that have "Enterprise" in the name, such as pjTaskEnterpriseCost1. Team Foundation does not publish or refresh data to Office Project Server. Therefore, these field names are not supported.
See Also
Tasks
Change How Fields are Mapped to Microsoft Project
Concepts
Customizing Microsoft Project Field Mappings