IntroductionRecently, we needed to migrate our project information from Sharepoint to Team Foundation Studio. This involved bugs, requirements, etc. Generally, we would edit the xml file and import and so on, but required a developer to do the work, which of course would take us away from programming. After some research, I found out how, through the GUI supplied by the TFS PowerTools for Visual Studio, this same task can be accomplished. Now, our project manager and happily (I say that sarcastically) add the user stories/bugs into TFS. This GUI allows you to add controls and inputs to the Work Items screens (suchs as User Stories and Bugs) to help better define the item. Many people familiar with Sharepoint know how easy it is to add a new filter type or input control to help more clearly define the item. I hope this will save anybody the trouble of looking up this information on their own, enjoy!
BackgroundPreviously, the xml file would need to be exported, modified and imported. This generally required a developer to do the work, which of course is tedious, time consuming and should be done by a project manager or quality department.
Using the code1) You need to go to the website below and download the vs2k10 TFS PowerTools. It is an add-on for Visual Studio. Make sure your VS is shut down and click download, and then 'Run'.
2) After the installation is complete (it does take a few minutes), open VS back up. At the top of VS, in the menu bar, you need to expand the menu as such:
Tools>Process Editor>Work Item Types>Open WIT from Server (click on this).
3) A new box will open up, as shown below, expand your project, select the type (for this example I chose User Story) and click 'OK'.
4) the next screen that opens up is essentially the 'guts' of the User Story, allowing you to customize everything on the UI for adding/editing a User Story item. For this example, we are going to add a text box to the classification section to store the name of the source that provided us the user story. We first need to add a 'type' to reference from the User Story UI. First click 'New', a screen will open up. We are only going to change the 'Name', 'Reference Name', and 'Help Text' in this screen.
The 'Name' field is what will be written next to the textbox, 'Reference Name' is how it's defined in the TFS database. A good naming convention would be ProjectTitle.Name. Finally, the 'Help Text' is a description of this item we are adding. Change the values to your liking and click 'OK' to save it.
5) Next we want to click on the 'Layout' tab, and find the 'Group - Classification' section. See the screen shot below:
6) Now right click on the 'Column' node under 'Group - Classification' and select 'New Control' from the context menu. On the right will be a properties window where you just change the 'Label' to whatever you want to be displayed on the actual screen. The 'Type' property lets you choose what type of control it is (i.e. text, date, etc). In the 'FieldName' property click and select the 'Reference Name' that we created in step 4. If you followed the suggest naming convention it will be ProjectTitle.Name.
7) When you're all set, you can click 'PreviewForm' to see if it is exactly what you want.
8) When complete, make sure you save at the top of Visual Studio.