Although
we are an agile shop we still have a few managers who like to use Microsoft
Project. There is no project server setup to integrate with Team
Foundation Server. As of now the manager would like to export from TFS
into MS Project, update, and import back in.
Once
the data is in project he will setup dependencies and other linking project
managers like to do. With the goal of producing a Gantt chart to help
with dates. They already have this by working with the velocity and burn
down charts so I believe the main benefit is the setting up of task
dependencies and making those visible. I haven't found a good way to do
this in TFS yet (sibling links don't stop you from completing a task before a
dependency.)
Project
uses field mappings between TFS and itself to define what fields show up in
Project and which are editable. One of
the fields the project manager wanted to be able to update is StoryPoints. As luck would have it this is not one of the
default fields that show up.
This Microsoft
article gives some explanation to the TFSFieldMapping file and how to download
and upload it to TFS.
I followed the
documentation and went with the advice of the project manager to add the field
as ProjectField="pjTaskText20". I learned a few things by doing this. When trying to upload I got this message:
TF233004: You must install Office Primary Interop
Assemblies (PIA) in order for Team Foundation Server to validate the Office
Project Field Mapping file prior to upload. To install PIA, go to the Microsoft
Web site: http://go.microsoft.com/fwlink/?LinkId=168855.
I went to
Microsoft's site and found the Microsoft Office 2010:
Primary Interop Assemblies Redistributable.
After installing this I got the same message. The internet certainly makes work
easier. After some searching I found a
post that says this doesn't work. What
you really need to do is install MS Project.
Hopefully for the reader you have this available to you.
On the next upload
attempt I did get a little further.
Connecting...
Validating...
TF233003: Cannot
upload the specified file as it either contains invalid elements or the
elements are not in the correct sequence. Correct the Team Foundation Server
Field Mapping file and try again.
Error
detail:
TF234001:
Work item field Microsoft.VSTS.Scheduling.StoryPoints is mapped to the wrong
field type in Microsoft Project. You can map work item fields of type Double only to Project
Cost, Duration, Work, and Number fields. Map the work item field to a Microsoft
Project field of type Double.
Again I turned to
the internet and found a better article.
What I needed was to define it as a Number (I guess that suffices for
type Double.)
Columns displayed in
Project depend on the predefined TFS - MS Project work item field
mapping. To make Story Points show up in MS Project, you have to
customize the Project-TFS mapping file since Story Points are not mapped to a
Project field by default.
1. From the VS
Command Prompt, run "TFSFieldMapping download" command to get the
mapping file locally.
2. Add a new entry
to the file to map your Story Points field to an MS Project field (pjTaskNumberx)
3. From the VS
Command Prompt, run "TFSFieldMapping upload" command to push the
mapping file back to the TFS Server.
This worked like a
charm. Below is the command I used for
the download and what the tfsfieldmappingfile looks like with my addition. As always you should keep a copy of the original
field mapping file (in TFS) and check in any changes to it.
I hope this helps
you in your quest to be the best TFS admin that ever walked the earth!
From C:\Program
Files\Common Files\Microsoft Shared\Team Foundation Server\12.0 I ran:
tfsfieldmapping
download
/collection:http://tfs/tfs/mycollection/teamproject:myteamproject/mappingfile:C:\WS\TFS\myteamproject\myTFSworkspaceSoICanKeepTrackOfMyChanges\TFSConfig\tfsfieldmappingfile.txt