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:
As an example, in our demo system we would use:
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:
Open Command Prompt from the Start menu.
In the command prompt you've opened, type the following:
Your results should be similar to the following:
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:
Open Command Prompt from the Start menu.
In the command prompt you've opened, type:
Your results should be similar to the following screenshot:
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:
Following are the steps to map them:
Open Command Prompt from the Start menu.
In the command prompt you've opened, type:
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:
Open Command Prompt from the Start menu.
In the command prompt you've opened, type:
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.