Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 19

Hands-On Lab

Managing Field Mappings for Integration of


Team Foundation Server and Project Server
Lab version: 1.0.0
Last updated: 7/20/2020
Contents

OVERVIEW................................................................................................................................................. 3

EXERCISE 1: ADDING A LOOKUP TABLE AND TASK CUSTOM FIELD IN PROJECT SERVER 2010 4

EXERCISE 2: MODIFYING THE DEFAULT FIELD MAPPING..................................................................9

EXERCISE 3: TESTING THE NEW FIELD MAPPING.............................................................................13

APPENDIX - RESOURCES...................................................................................................................... 18
Team Foundation Server and Project Server 2010 Integration Feature Pack Resources 18
Microsoft Project 2010 Resources 18
Microsoft Visual Studio Team Foundation Server 2010 Resources 19
Overview
To synchronize data between an enterprise project plan and a team project, you must associate the
work-item fields in Visual Studio Team Foundation Server 2010 with the fields in Microsoft Project
Server 2007 or Project Server 2010. You can add fields and specify how they synchronize by customizing
the field mappings. You can map both built-in and custom fields in Project. For example, you can share
data that does not relate to schedules (such as cost centers, team names, or health status) if you add
the fields that store these types of data to the mappings
You maintain one set of field mappings for each team project collection that hosts team projects that
you want to synchronize with Project Server. You must define the field mappings for each team project
collection that you have mapped to an instance of Project Web Access or Project Web App (PWA). You
can upload the default mappings, or you can customize a mapping file and upload it.

Figure 1
Customizing the Field Mappings Between Team Foundation Server and Project Server
The table below list the default Team Foundation Server 2010 and Project Server field mappings:

Team Project Server Work item types Work item types Work item types
Foundation field field in Agile 5.0 in CMMI 5.0 in Scrum 1.0
Title Task Name All All All except for Sprint
Assigned To Resources All All All except for Sprint
Completed Work Task Actual Work Task Task None
Remaining Work Task Remaining Work Task Task Task
Original Estimate Baseline Work Task Bug, Change Request, None
Issue, Requirement,
Risk, and Task
Start Date Task Start Task and User Story Task and Requirement Sprint
Finish Date Task Finish Task and User Story Task and Requirement Sprint
Note: The Microsoft® Visual Studio® Team Foundation Server® 2010 and Microsoft Project Server®
2010 Integration Feature Pack Demonstration Hyper-V Virtual Machine illustrates the integration
between Team Foundation Server 2010 and Project Server 2010. For another virtual machine with
hands-on-labs / demo scripts which showcases Team Foundation Server 2010, go to:
http://bit.ly/VS2010RTMVHD ; likewise, another virtual machine with hands-on-labs / demo scripts
which showcases Microsoft Project 2010 can be found here: http://go.microsoft.com/?linkid=9713956
System Requirements
In order to complete this lab you will need Project Server 2010 and Team Foundation Server 2010
Integration virtual machine provided by Microsoft. For more information on acquiring and using this
virtual machine, please see “Working with the Project Server 2010 and Team Foundation Server 2010
Integration Virtual Machine”.

Exercises
This Hands-On Lab comprises the following exercises:
1. Adding a Lookup Table and Task Custom Field in Project Server 2010
2. Modifying the Default Field Mapping
3. Testing the New Field Mapping

Estimated time to complete this lab: 30 minutes.

Next Step
Exercise 1: Adding a Lookup Table and Task Custom Field in Project Server 2010

Exercise 1: Adding a Lookup Table and


Task Custom Field in Project Server 2010
In this exercise, you will learn how to add a new field to the Project Web App (PWA) which will then be
used in later exercises.
1. Log in as Lina Abola (username: linaa) if you have not already done so. The password is
P2ssw0rd (capital letter P, the number two, the letter s, the letter s, the letter w, the number
zero, the letter r, and the letter d). Please see “Working with the Project Server 2010 and Team
Foundation Server 2010 Integration Virtual Machine” for instructions on how to log into the
VM.
2. First, we need to add a field called State in Project Server 2010, which does not exist by
default. Open a new browser window and navigate to the Project Web App site by using this
URL: http://tfspsdemo/pwa.
3. Select Server Settings from the Settings section.
Figure 2
PWA Server Settings
4. Select Enterprise Custom Fields and Lookup Tables from the Enterprise Data section.
Figure 3
Location of Enterprise Custom Fields and Lookup Tables hyperlink
5. Scroll down to the Lookup Tables for Custom Fields section and select the New Lookup
Table button.

Figure 4
Lookup Tables for Custom Fields
6. Enter the following values for the new lookup table:

Field Value
Name State
Type Text
Code Mask Characters | Any | .
Lookup Table (values) Active, Resolved, Closed, Proposed
7. Select the Save button to create the new lookup table.

Figure 5
Creating the new “State” lookup table
8. Now we can create a new Task custom field pointing to the lookup table. In the Enterprise
Custom Fields and Lookup Tables section of the PWA, select the New Field button in the
Enterprise Custom Fields section.
Figure 6
New Enterprise Custom Field
9. Enter the following values for the new custom field:

Field Value
Name State
Description Team Foundation Server Work Item State
Entity Task
Custom Attributes Lookup Table -> State

10. Select the Save button to create the new custom field.
Figure 7
Creating new custom field

Next Step
Exercise 2: Modifying the Default Field Mapping

Exercise 2: Modifying the Default Field


Mapping
Now that the new metadata has been defined in Project Server, you will learn how to modify the default
field mapping between Team Foundation Server and Project Server. We will leverage the TfsAdmin
command to do so.

Note: If continuing from the previous exercise, you can switch users rather than log out completely. To
do this, select Start, clicking the right arrow to the right of the Log off button, and finally selecting
Switch user. You can do this as an alternative to logging out for the remainder of this lab.

1. Log in as Lina Abola (username: linaa) if you have not already done so. The password is
P2ssw0rd (capital letter P, the number two, the letter s, the letter s, the letter w, the number
zero, the letter r, and the letter d). Please see “Working with the Project Server 2010 and
Team Foundation Server 2010 Integration Virtual Machine” for instructions on how to log
into the VM.
2. Open Visual Studio Command Prompt from Start | All Programs | Microsoft Visual Studio
2010 | Visual Studio Tools | Visual Studio Command Prompt (2010).
3. First, we need to download the default mapping to a file so we can modify it. Type the
following at the command line and press Enter:

TfsAdmin ProjectServer /downloadfieldmappings


/collection:http://tfspsdemo:8080/tfs/defaultcollection
/filepath:c:\temp\TFSPSmapping.txt

Figure 8
Using TfsAdmin command to download field mappings
4. Now, we will open the file to add the State field created earlier. Go to C:\temp and open
TFSPSmapping.txt with Notepad.
5. Locate and copy the xml node for the Title field.
Figure 9
Default field mappings
6. Insert a space after the Title field and paste in the copied XML. We will use this XML as a
template for adding in mapping for our custom field.

Figure 10
Using existing field mapping XML as template for new mapping
7. Modify the values of the copied XML to be the following:

Figure 11
New field mapping XML
8. Save the mapping file as TFSPSmappingv2.txt.
Figure 12
Saving changes to field mappings
9. The last step is to upload the newly defined field mapping. Type the following at the
command line and press Enter:

TfsAdmin ProjectServer /uploadfieldmappings


/collection:http://tfspsdemo:8080/tfs/defaultcollection
/filepath:c:\temp\TFSPSmappingv2.txt

Figure 13
Uploading field mappings to TFS
Next Step
Exercise 3: Testing the New Field Mapping

Exercise 3: Testing the New Field


Mapping
Now that the field mapping has been modified to include State, you will learn how to use the new field.
1. Log in as Lina Abola (username: linaa) if you have not already done so. The password is
P2ssw0rd (capital letter P, the number two, the letter s, the letter s, the letter w, the number
zero, the letter r, and the letter d). Please see “Working with the Project Server 2010 and Team
Foundation Server 2010 Integration Virtual Machine” for instructions on how to log into the
VM.
2. Open Microsoft Office Project 2010 from Start | All Programs | Microsoft Office | Microsoft
Project 2010. This is the tool for project managers to edit enterprise project plans stored in
Project Server.
3. Open the Human Resources Application enterprise project plan from Project Server by
choosing File | Open and then choosing Human Resources Application and clicking Open. If it is
not visible, you can double-click the “Retrieve the list of all projects from Project Server” option
to show all of the available project plans on Project Server.
4. To add the newly created task custom field to the current view, scroll to the right on the grid
and click on the Add New Column header.
5. Choose the field labeled State (Enterprise).
Figure 14
Adding new column for the State field
6. Locate the New Employee Wizard requirement and change its state to Active.

Figure 15
Assigning State to an existing work item
7. Set all of the children tasks to the Active state, except for the Write Unit Tests task which
you can set as Proposed.

Figure 16
Assigning State to existing work items

Note: If you are working on this lab following the “Managing Project Details in an Enterprise
Project Plan Mapped to a Team Project”, you will also have a Change Benefits Plan For
Employee requirement in the Development node. Go ahead and set its state also.

8. Select the Save button (or press Ctrl+S) to save changes.


9. To publish the enterprise project plan to Project Server, click on the Publish button in the
File | Info menu. This will start the publishing jobs and you can monitor the progress in the
status bar.

Figure 17
Publishing project plan to Project Server

Note: It make take a few seconds to finish publishing.

10. Close Microsoft Office Project 2010 and “check-in” the project plan if prompted.
11. If prompted to replace the existing file, select OK.
12. Log in as Peder Thode (username: pedert) if you have not already done so. The password is
P2ssw0rd (capital letter P, the number two, the letter s, the letter s, the letter w, the number
zero, the letter r, and the letter d). Please see “Working with the Project Server 2010 and Team
Foundation Server 2010 Integration Virtual Machine” for instructions on how to log into the
VM.
13. Open Visual Studio 2010 from Start | All Programs | Microsoft Visual Studio 2010 | Visual
Studio 2010. This is the tool used daily by the development team.

Note: When running the virtual machine on slower hardware, you may see an error when
connecting to Team Foundation Server after booting up for the first time. You are seeing this
simply because Team Foundation Server has not finished starting up. To work around this
issue, wait a few moments and then restart Visual Studio.

14. In the Team Explorer window, expand the Work Items and Team Queries nodes under the
Human Resources (based on the MSF for CMMI Process Improvement v5.0 template) team
project and double-click the Work Breakdown work item query to open the work item results
window.

Figure 18
Work Breakdown team work item query
15. Find the UI Dialog task assigned to David Simpson that is a child of the Change Benefits Plan
for Employee requirement. Double-click the task to open it.

Figure 19
Human Resources Application work breakdown
16. Find the UI Dialog task that is a child of the New Employee Wizard requirement. Double-
click the task to open it.
17. Note that the State field is reported as Active. You can check the history to see the old and
new values.

Figure 20
UI Dialog task showing updated State value

Figure 21
Viewing history for UI Dialog task
18. This concludes this Team Foundation Server 2010 and Project Server Integration Feature
Pack hands-on lab. It illustrated how the Feature Pack can be configured to synchronize
additional fields between the two solutions to enhance collaboration between the project
managers and the development team. In the scenario that you walked through in this lab, Peder
would be able to change the State of work items in Team Foundation Server and have those
value flow back to Project Server and Lina, the project manager. Now that the metadata is in
both systems and synchronized, you could easily build reports and dashboards that leverage the
new State attribute.
Next Step
Appendix - Resources

Appendix - Resources
Team Foundation Server and Project Server 2010 Integration Feature Pack Resources
Solutions For Application Lifecycle Management: http://www.microsoft.com/visualstudio/en-
us/solutions/management
Customer Case Studies:
http://www.microsoft.com/casestudies/Case_Study_Search_Results.aspx?
Type=1&Keywords=ALM
MSDN Product documentation: http://msdn.microsoft.com/library/gg455680.aspx
MSDN Public Forums - Team Foundation Server and Project Server Integration
http://social.msdn.microsoft.com/Forums/en-US/tfsprojectsrvint

Microsoft Project 2010 Resources


Product information
Project 2010 product site: http://www.microsoft.com/project
Project Team Blog: http://blogs.msdn.com/project
Case Studies : http://www.microsoft.com/project/en/us/customer-success.aspx
End-User Product Help
Project 2010 Help http://office2010.microsoft.com/project-help
Project Server 2010 Help http://office2010.microsoft.com/project-server-help
Interactive content - Videos & Sessions & Webcasts
http://www.microsoft.com/showcase/en/US/channels/microsoftproject
http://www.microsoft.com/events/series/epm.aspx
Project Professional 2010 and Project 2010 Demo Image:
Download: http://go.microsoft.com/?linkid=9713956
Hosted Virtual Lab: http://go.microsoft.com/?linkid=9713654
IT Professional related - TechNet
Tech Center: http://technet.microsoft.com/ProjectServer
Admin Blog: http://blogs.technet.com/projectadministration
Developer related - MSDN
Developer center: http://msdn.microsoft.com/Project
Programmability blog: http://blogs.msdn.com/project_programmability
Got Questions? Search or ask in the official Microsoft Forums!
http://social.msdn.microsoft.com/Forums/en-
US/category/projectserver2010,projectprofessional2010/
SharePoint 2010 Products
http://sharepoint.microsoft.com

Microsoft Visual Studio Team Foundation Server 2010 Resources


Team Foundation Server MSDN Page: http://msdn.microsoft.com/en-us/vstudio/ff637362.aspx
Microsoft Visual Studio Team Foundation Server 2010 Trial – ISO:
www.microsoft.com/downloads/details.aspx?FamilyID=3660cacf-f077-44d3-a9d9-
97e801da2035&displaylang=en
Team Foundation Server Team Blog: http://blogs.msdn.com/b/team_foundation/
Brian Harry’s Blog Site: http://blogs.msdn.com/b/bharry/
Channel 9 Team Foundation Server Videos: http://channel9.msdn.com/tags/TFS/

To give feedback please write to VSKitFdbk@Microsoft.com


Copyright © 2011 by Microsoft Corporation. All rights reserved.

You might also like