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.

Note

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.

Required Permissions

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

  1. 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.

  2. Open the mapping file you downloaded (for example, C:\MappingFile.xml) in an XML editor.

  3. Add new mappings or edit existing mappings in the following format:

    <Mapping WorkItemTrackingFieldReferenceName="fieldname" 
       ProjectField="projectfield" 
       ProjectName="user friendly name"
       />
    

    For example:

    <Mapping WorkItemTrackingFieldReferenceName="Microsoft.VSTS.Common.Priority"
       ProjectField="pjTaskText19"
       ProjectName="Work Item Priority" />
    

    Where:

    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.

    Note

    For a full list of all the Microsoft Project field values for the ProjectField attribute, see Field Mappings in Microsoft Project.

  4. 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.

  5. 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" />
    
  6. 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" />
    
  7. 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" />
    
  8. Save the mapping file.

  9. 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.

See Also

Concepts

Tracking Team Projects in Microsoft Excel and Microsoft Project

Reference

Field Mappings in Microsoft Project

Other Resources

Customizing Microsoft Project Field Mappings