Click here to Skip to main content
Click here to Skip to main content

Manipulating Work Items in Team Foundation Studio VS2010

, 3 Feb 2011
Rate this:
Please Sign up or sign in to vote.
Learn how to add items to work item layouts in Team Foundation Studio, using Visual Studio 2010.

Introduction

Recently, 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 it 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 can 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 (such 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!

Background

Previously, 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 code

  1. You need to go to the website below and download the VS2010 TFS PowerTools. It is an add-on for Visual Studio. Make sure your VS is shut down, and click Download and then 'Run'.
  2. Download here.

  3. 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:
  4. Tools > Process Editor > Work Item Types > Open WIT from Server (click on this).

  5. 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'.
  6. step3.gif

  7. 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', and a screen will open up. We are only going to change the 'Name', 'Reference Name', and 'Help Text' in this screen.
  8. 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.

  9. Next, we want to click on the 'Layout' tab, and find the 'Group - Classification' section. See the screenshot below:
  10. 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 suggested naming convention, it will be ProjectTitle.Name.
  11. step6.gif

  12. When you're all set, you can click 'PreviewForm' to see if it is exactly what you want.
  13. When complete, make sure you save at the top of Visual Studio.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Jason Wilczak
Software Developer (Junior) LumeTix
United States United States
Friend to computers since the release of the 486DX2 66MHz 480MB HDD and 16MB in 1994! Jason has successfully worked with ALL Windows operating systems and versions of Microsoft Office. Enjoys spending his time programming on the .NET framework, using C#, and occasionally upgrading/building/repairing computers. Visit me and my partner Adam at www.lumetix.com or find us on Facebook under LumeTix.
 
My Blog:
http://20000linesunderthec.blogspot.com/

Comments and Discussions

 
Generalthanks for sharing PinmemberPranay Rana3-Feb-11 20:37 
GeneralRe: thanks for sharing PinmemberJason Wilczak1-Mar-11 7:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 4 Feb 2011
Article Copyright 2011 by Jason Wilczak
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid