Condividi tramite


Manage the association of enterprise projects to projects

TFS 2015 | TFS 2013

Note

TFS 2017 and later versions no longer support native integration with Microsoft Project Server. If you upgrade to TFS 2017 or want to use a third party option, see Synchronize TFS with Project Server.

To support synchronization of data between an enterprise project plan and a project, you must map the plan to the project. You can map multiple plans to the same project. To map enterprise projects, you must have registered and mapped the instance of Project Web Access or Project Web App (PWA) that is associated with the enterprise project to a project collection.

Requirements

Before you can map an enterprise project plan to a project, you must have configured the integration of Visual Studio Team Foundation Server and Microsoft Project Server. After you have performed the initial configuration, you can map and unmap plans to projects as needed.

To perform these procedures, you must have the Administer Project Server integration permission for a project collection, or you must belong to the Team Foundation Administrators group. Also, the service account for Visual Studio Team Foundation Server must have administrative permissions to the instances of PWA that will participate in data synchronization. For more information, see Assign permissions.

Retrieve the instances of PWA that are registered

By using the following command, you can list the instances of PWA that have been registered with an application-tier server and are available to be mapped to a project collection.

To list registered instances of PWA

  1. Open a Command Prompt window where either Visual Studio or Team Explorer is installed and enter:

    cd %programfiles(x86)%\Microsoft Visual Studio 12.0\Common7\IDE  
    

    On a 32-bit edition of Windows, replace %programfiles(x86)% with %programfiles.

  2. Type the following command, and then choose the ENTER key.

    TfsAdmin ProjectServer /GetRegisteredPWA /tfs:tfsUrl  
    

    Replace tfsUrl with the uniform resource locator (URL) of the application-tier server.

    The following message appears:

    The following PWA instances are registered: pwaUrl.

    For more information, see Register an instance of PWA.

Retrieve the project collections that are mapped to an instance of PWA

By using the following command, you can determine which collections are mapped to an instance of PWA and available to participate in data synchronization. You can associate an enterprise project plan only with a project that is hosted on a collection that has been mapped to the instance of PWA that supports your plan.

To list the mapped collections

  1. At a command prompt, type the following command, and then choose the ENTER key:

    TfsAdmin ProjectServer /GetMappedCollections /tfs:tfsUrl  
    

    Replace tfsUrl with the URL of the application-tier server.

    The following message appears:

    The following collections are mapped: tpcUrl to Project Web Access pwaUrl.

Associate an enterprise project plan with a project

You can map an enterprise project plan to a project that contains data that you want to synchronize. As the following illustration shows, you can associate multiple enterprise projects with the same project.

Associate enterprise projects with a project

To map an enterprise project plan to a project

  1. At a command prompt, type the following command, and then choose the ENTER key

    TfsAdmin ProjectServer /MapPlanToTeamProject /collection:tpcUrl /enterpriseProject:EnterpriseProjectName /teamProject:TeamProjectName /workItemTypes:ListOfWorkItemTypes /nofixedwork /projectFieldForWorkItemType:ProjectFieldName  
    

    Replace tpcUrl with the URL of the project collection, EnterpriseProjectName with the name of the enterprise project plan, and TeamProjectName with the name of the project. Replace ListOfWorkItemTypes with the names of the types of work items that you want to participate in data synchronization. Specify /noFixedWork if you want to prevent fixed-task-type assignments. You can also specify the /projectFieldForWorkItemType argument and the name of a field in Project to store the type of work item.

    The following messages appear:

    Mapping enterprise project EnterpriseProjectNameto projectTeamProjectName.

    You have successfully mapped enterprise project EnterpriseProjectName to project TeamProjectName.

  2. Repeat step 1 for each enterprise project plan that you want to associate with a project.

Remove the association between an enterprise project plan and a project

Before you can remove the association between an enterprise project plan and a project, you must first delete all tasks that are linked to work items in the mapped project.

To unmap an enterprise project plan from a project

  1. At a command prompt, type the following command, and then press ENTER.

    TfsAdmin ProjectServer /UnmapPlanFromTeamProject/collection:tpcUrl /enterpriseProject:EnterpriseProjectName /teamProject:TeamProjectName  
    

    Replace tpcUrl with the URL of the project collection, EnterpriseProjectName with the name of the enterprise project plan, and TeamProjectName with the name of the project.

    The following messages appear:

    Unmapping enterprise project EnterpriseProjectName from project TeamProjectName.

    Enterprise project EnterpriseProjectName was successfully unmapped from project TeamProjectName.

Add TFS resources to the resource pool for Project Server

To assign users in Team Foundation as resources in Project, you must add them to the enterprise resource pool and to the resource pool for the enterprise project plan. To make this process easier, you can configure PWA to automatically synchronize the security groups with groups of the same name in Active Directory. Also, you can synchronize users and resources in Project Server with users in Active Directory across multiple domains and forests.

For information about how to add users to the enterprise resource pool, see the following pages on the Microsoft website:

Configure TFS-Project Server integration
Manage mappings
Administer TFS-Project Server integration