Quantcast
Channel: Category Name
Viewing all articles
Browse latest Browse all 10804

Multivaluelist control in TFS Work Item Tracking

$
0
0

One of the top asks from people in the field is to have the ability to have a dropdown in which you can select multiple values. Little people know that there is a already a solution out on CodePlex, although it has its limitation. But it might be just good enough for what you are looking for.

Since the data is stored in the format “[value1];[value2]”, and the data is backed by a field that stores only 255 characters, you can quickly run into a character limit when have long values in the dropdown and/or select a lot of options. And because of this storage only limited query and reporting capabilities are available.

To enable the solution, you need to follow these three steps:

  1. Update your work item type definitions using witadmin or the process template editor.
  2. Install the control for TFS Web Access
  3. Install the control on all clients that run VS

In the blog post I will add a field called OS to list the different platforms a bug applies to.

Update your work items

Export the work item type “Bug” with the command

witadmin exportwitd /collection:http://:8080/tfs/defaultcollection /p: /n:Bug /f:\Bug.xml

Open the exported Bug.xml file in notepad.

Locate the section and add the field OS:


  Platform bug was found on
 
   
   
   
   
   
   
   
   
   
   
 

In the FORM section locate the control where the new field should be placed beneath. In this example, I want to place the control below the Iteration Path, so I search for

It tells the system to use the MultiValueControl when it is available, but if a client does not have the control installed, it will fallback to the default FieldControl, which is the textbox.

Save the file and upload it to your server with the command

witadmin importwitd /collection:http://:8080/tfs/defaultcollection /p: /f:\Bug.xml

Install control on Web Access

For the next step, you need to download the custom WIT controls from codeplex: http://witcustomcontrols.codeplex.com. Extract the downloaded zip, which should contain two files.

image

Go to the Extentions page in Web Access, which you find with the url: :8080/tfs/_admin/_extensions">:8080/tfs/_admin/_extensions">http://:8080/tfs/_admin/_extensions (or go to the Administration section, click on Control panel in the top navigation and choose the Extension hub).

image

Click Install and locate the file WitCustomControls.MultiValueControl.zip.

image

And click Enable.

Navigate to the Home page and create a new bug, and you will see the control:

image

Install control for Visual Studio

If a user has not installed the control on his machine (s)he will get the default dropdown, because we have used the PreferredType attribute

image

If you however run the msi that comes with the downloaded file from CodePlex, you will see the correct control in VS too.

image

When you have selected multiple options with the dropdown, users that have not installed the control are still able to modify the data

image

Final words

Although it has its limitations, it might be just good enough for you. If you are using our service (http://tfs.visualstudio.com) or don’t want to deal with the customization or the limitations, a good alternative good be to use the Tags that we have announced: http://blogs.msdn.com/b/bharry/archive/2013/01/30/announcing-visual-studio-2012-update-2-vs2012-2.aspx


Viewing all articles
Browse latest Browse all 10804

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>