Showing posts with label Microsoft Project. Show all posts
Showing posts with label Microsoft Project. Show all posts

Monday, August 4, 2014

Team Explorer Everywhere on MAC

Setup Team Explorer Everywhere 2013
We have a build server for Apple applications.  This will need to switch over to TFS as part of the migration from SVN to TFS 2013.  Microsoft (MS) does make interaction with Team Foundation Server (TFS) possible through the use of Microsoft Team Explorer Everywhere 2013 (TEE).  It can be downloaded here.  One thing to note is this is a command line utility.  There is no GUI for it unless you install Eclipse and then the TFS plug-in for Eclipse.

The install documentation is very lax and consists of 3 basic steps.

To install the Cross-Platform Command-Line Client for Team Foundation Server
  1. Unzip the archive (TEE-CLC-12.0.0.zip file) that contains the client.
  2. Configure your shell or system path to include the folder to which you unzipped the archive.
  3. To verify that the client is working, at a command prompt, type tf, and then press the ENTER key.

I believe MS assumes you know the OS in detail.  However this is not always the case (I know nothing about MAC X).  Below are the steps I followed to get the utility running for all users.  I do have prior knowledge of Unix command line which helped me get through this.

  1. Download and unzip to a location on the MAC.  In my case this was to the Dumps share (Unzipped from Windows to the MAC share).
  2. Log into the MAC build server as an administrator (or someone with SUDO permissions.)
  3. Since I unzipped the folder as my Windows user the MAC user did not even have writes to read the folder contents.  Grant Everyone read by overwriting the MAC permissions in Finder
  4. On the MAC build server open the command line console.
  5. So that all users have access to TEE we will copy the folder a common location.   Use the cp command to accomplish this.
    cd /usr/local
    sudo cp -R /dumps/TEE-CLC-12.0.1 .
You should get a prompt for your password.  If you do not have sudo rights you will not be able to execute this command.

  1. Edit the system path for MACs to include this new folder in searching for commands.
    sudo nano /etc/paths
  2. Add a new line at the end of the file that has /usr/local/TEE-CLC-12.0.1
  3. Save and close the file (Ctrl-X and Yes)
  4. You will not be able to run the tf command until permissions are granted to all users.
    cd /usr/local/TEE-CLC-12.0.1
    sudo chmod 755 tf
  5. Close and reopen a new terminal to apply the path changes
  6. Type in tf.  Now you should get the help information for the file if the path and application are setup properly.

Thursday, July 31, 2014

Adding TFS 2013 User Story Points field in Microsoft Project

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