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:
- Update your work item type definitions using witadmin or the process template editor.
- Install the control for TFS Web Access
- 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
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:// 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. Go to the Extentions page in Web Access, which you find with the url: :8080/tfs/_admin/_extensions">:8080/tfs/_admin/_extensions">http:// Click Install and locate the file WitCustomControls.MultiValueControl.zip. And click Enable. Navigate to the Home page and create a new bug, and you will see the control: 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 If you however run the msi that comes with the downloaded file from CodePlex, you will see the correct control in VS too. When you have selected multiple options with the dropdown, users that have not installed the control are still able to modify the data 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.aspxInstall control on Web Access
Install control for Visual Studio
Final words