Book Image

Instant Team Foundation Server 2012 and Project Server 2010 Integration How-to

By : Gary P Gauvin
Book Image

Instant Team Foundation Server 2012 and Project Server 2010 Integration How-to

By: Gary P Gauvin

Overview of this book

Developers and project managers managing large software development projects often find themselves at odds during the course of a project. This usually ends with the developers feeling they are wasting time sending status updates, and the project managers feeling that they aren't getting all the information they need to satisfy stakeholders. It doesn't have to be that way! Instant Team Foundation Server 2012 and Project Server 2010 Integration How-to, is a practical format that walks you through what you need to know to get two of Microsoft's most popular products for managing team productivity integrated. We boil down the complex parts to deliver just what you need to know to get started today.The book takes you through the planning, setup, and configuration of Team Foundation Server Extensions for Project Server. Step-by-step instructions are provided with enough detail to get you started without burdening you with a ton of background information. Learn the basics of how to manage the integration as well as a few helpful tips on establishing a test environment, and the basics of how to integrate these server-based technologies. You will learn everything you need to know to get started with planning, installing, and managing the integration.
Table of Contents (7 chapters)

Managing Project Server integration (Should know)


The recipe will detail the commands used to manage the Project Server integration using the TFSAdmin Project Server's command-line tool. Various topics will include verifying synchronization, common command parameters, team project association management, managing the association of enterprise project plans to team projects, work item types, and how to support custom field mapping. There is no particular order of these commands in this section once you pass the verifying synchronization stage. Please use it as a reference when needed.

Getting ready

To begin with, you'll want to start up PWA and the Team Foundation Server Administration console. By now you should be very familiar with these tools that you've been using in the previous sections.

How to do it...

We'll lay the steps out here by subject to make it easy to follow and refer back to later.

  • Verifying synchronization:

    First let's complete the work we performed in the recipe Initial Integration Configuration by verifying if the synchronization between Project Server and Team Foundation Server is working. At the simplest level, if your tasks are synchronizing properly between the enterprise project in Project Server and the team project in Team Foundation Server, then we can assume that the synchronization (at least some of it) is working.

    At a deeper level, we can check the synchronization messages on the server. To perform this, we can use the TFSAdmin command-line tool that we should be familiar with by now. Also, in order to run the TfsAdmin command-line tool indicated in these steps, you will need to run it in an elevated command prompt (right-click on the Command Prompt console in the Start menu and select Run as administrator). You'll also need to change the directory to C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE, or add it to your path. Display the most recent errors that were logged for a team project collection by using the /GetSyncMessages option of the TFSAdmin ProjectServer command-line tool. The syntax of the command is as follows:

    TfsAdmin ProjectServer /GetSyncMessages /collection:tpcUrl

    As an example, in our demo system we would use:

    TfsAdmin ProjectServer /GetSyncMessages /collection:http://tfspsdemo:8080/tfs/DefaultCollection

    If errors are indicated, you will need to follow up and resolve them on a case-by-case basis. Not all errors indicate a failure to synchronize and may be informational. The ultimate test is whether or not mapped work items are actually being synchronized between the two systems.

  • Managing team project association:

    Management of the association of the team project and enterprise project is done with the TfsAdmin ProjectServer command-line tool that we've been using throughout the recipes. To synchronize the data between an enterprise project plan and a team project, a project plan must be mapped to a team project. Multiple enterprise project plans can also be mapped to the same TFS team project. Before trying this, please be sure that you have registered and mapped the instance of PWA that is associated with the enterprise project to a team project collection as covered in prior sections. After this is complete, we can map and unmap plans to team projects as required (as we did in a previous recipe). To begin with, let's open a command prompt and change the directory to C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE. From here, we are going to use the URLs and PWAs and team project names that are part of our demo server for clarity's sake.

    TFS URL: http://tfspsdemo:8080/tfs

    Collection URL: http://tfspsdemo:8080/tfs/DefaultCollection

    Also, replace tpcUrl with the URL of the team project collection, EnterpriseProjectName with the name of the enterprise project plan, and TeamProjectName with the name of the team project.

  • Listing PWA instances that are registered:

    First let's list the instances of PWA that are already registered. This will give us an idea where to start if this is an existing installation:

    1. Open Command Prompt from the Start menu.

    2. In the command prompt you've opened, type the following:

      TfsAdmin ProjectServer /GetRegisteredPWA /tfs:http://tfspsdemo:8080/tfs

    Your results should be similar to the following:

    GetRegisteredPWA output

  • Listing the project collections that are mapped to a PWA instance:

    Next we'll want to see what collections have been mapped for data synchronization. Keep in mind that you can associate an enterprise project plan only with a team project (in TFS) that is on a collection that has already been mapped to an instance of PWA that contains that particular enterprise project plan.

    Following are the steps to list the project collections:

    1. Open Command Prompt from the Start menu.

    2. In the command prompt you've opened, type:

      TfsAdmin ProjectServer /GetMappedCollections /tfs:http://tfspsdemo:8080/tfs

    Your results should be similar to the following screenshot:

    GetMappedCollections output

  • Associating a Project Sever enterprise project plan with a Team Foundation Server team project:

    In order to synchronize a team project with an enterprise project plan, we'll need to associate them by mapping them. We'll be using the TfsAdmin ProjectServer command-line tool again. We've already used this command in the previous sections, so it may look familiar.

    The following diagram shows the mapping an Enterprise Project to a Team Project workflow:

    Mapping an Enterprise Project to a Team Project workflow

    Following are the steps to map them:

    1. Open Command Prompt from the Start menu.

    2. In the command prompt you've opened, type:

      TfsAdmin ProjectServer /MapPlanToTeamProject /collection:tpcUrl /enterpriseProject:EnterpriseProjectName /teamProject:TeamProjectName /workItemTypes:ListOfWorkItemTypes /nofixedwork /projectFieldForWorkItemType:ProjectFieldName
  • Deleting the association between an enterprise project plan and a team project:

    Occasionally, you may want to remove the association you've set up. Before you can do this, you'll need to delete any tasks that are linked to work items in the mapped team project. Although the /Force option can override this, it is not recommended unless you are sure that there are no work items currently mapped.

    Following are the steps for unmapping:

    1. Open Command Prompt from the Start menu.

    2. In the command prompt you've opened, type:

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

    If successful, you should get an output message similar to the following:

    Unmapping enterprise project EnterpriseProjectName from team project TeamProjectName.

    Enterprise project EnterpriseProjectName was successfully unmapped from team project TeamProjectName.