How to: Change How Fields are Mapped to Microsoft Project
If you want to change the publishing behavior for Microsoft Project, you must change the Microsoft Project mapping file. By modifying the mapping file, you can specify which fields in Team Foundation are mapped to by Microsoft Project fields. You can also control publishing behavior through the PublishOnly attribute, and designate special fields such as the context field.
A mapping file is associated with one team project. You can change the mapping file at any point in time on a team project. The mapping file a team project starts with is determined by the mapping file from the process template that was used to create the team project.
When you modify the mapping file for a team project, you are modifying the Microsoft Project field maps for all team members on that team project.
To perform these procedures, you must be a member of the Project Administrators group or have the Edit project-level information and View Project-level information permissions set to Allow. Additionally, you must have permissions to create the mapping file in the local path that you specify. For more information, see Team Foundation Server Permissions.
To change how work item fields are mapped to Microsoft Project
Download the mapping file from the team project you want to modify. For more information, see How to: Download or Upload a Microsoft Project Field Mapping File.
Open the mapping file you downloaded (for example, C:\MappingFile.xml) in an XML editor.
Add new mappings or edit existing mappings in the following format:
<Mapping WorkItemTrackingFieldReferenceName="fieldname" ProjectField="projectfield" ProjectName="user friendly name" />
<Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Common.Priority" ProjectField="pjTaskText19" ProjectName="Work Item Priority" />
Microsoft.VSTS.Common.Priority is an existing field in the MSF for Agile Software Development process.
pjTaskText19 is a custom text field in Microsoft Project.
For a full list of all the Microsoft Project field values for the ProjectField attribute, see Field Mappings in Microsoft Project.
Optionally, indicate if the field is to be published but not refreshed. Add the PublishOnly attribute to the mapping section for that field and set the attribute to true. This attribute can be used to allow for team members to see a field value but not be able to change it in Team Foundation.
Designate which Microsoft Project field is the synchronization field by using the following syntax:
<SyncField ProjectField="" />
The following example shows how to specify pjTaskText25 as the synchronization field:
<SyncField ProjectField="pjTaskText25" />
Optionally, designate which Microsoft Project field displays links and attachments information by using the following syntax:
<LinksField ProjectField="" />
The following example shows how to specify pjTaskText26 as the links and attachments field:
<LinksField ProjectField="pjTaskText26" />
Optionally, designate which Team Foundation field displays task hierarchy information by using the following syntax:
<ContextField WorkItemTrackingFieldReferenceName="" />
The following example shows how to specify Microsoft.VSTS.Scheduling.TaskHierarchy as the context field.
<ContextField WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Scheduling.TaskHierarchy" />
Save the mapping file.
Upload the mapping file to the team project you want to modify. For more information, see How to: Download or Upload a Microsoft Project Field Mapping File.