Multivaluelist control in TFS Work Item Tracking

Multivaluelist control in TFS Work Item Tracking

Rate This
  • Comments 12

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. Few people know that there is 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://<your server>:8080/tfs/defaultcollection /p:<your team project> /n:Bug /f:<your path>\Bug.xml

Open the exported Bug.xml file in notepad.

Locate the <FIELDS> section and add the field OS:

<FIELD name="Platform" refname="Microsoft.OS" type="String">
  <HELPTEXT>Platform bug was found on</HELPTEXT>
  <SUGGESTEDVALUES expanditems="true">
    <LISTITEM value="[Vista]" />
    <LISTITEM value="[Win7]" />
    <LISTITEM value="[Win8]" />
    <LISTITEM value="[All OS’s]" />
    <LISTITEM value="[XP]" />
    <LISTITEM value="[Win2K3]" />
    <LISTITEM value="[Win2K8]" />
    <LISTITEM value="[Win2K8 R2]" />
    <LISTITEM value="[WP8]" />
    <LISTITEM value="[Win8Svr]" />

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 <Control FieldName="System.IterationPath". Now paste the following text:

<Control FieldName="Microsoft.OS" Type="FieldControl" PreferredType="MultiValueControl" Label="OS" LabelPosition="Left" />

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://<your server>:8080/tfs/defaultcollection /p:<your team project> /f:<your path>\Bug.xml

Install control on Web Access

For the next step, you need to download the custom WIT controls from codeplex: 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://<yourserver>:8080/tfs/_admin/_extensions (or go to the Administration section, click on Control panel in the top navigation and choose the Extension hub).


Click Install and locate the file


And click Enable.

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


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


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


Final words

Although it has its limitations, it might be just good enough for you. If you are using our service ( 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:

Leave a Comment
  • Please add 4 and 2 and type the answer here:
  • Post
  • But with this solution gathering any sort of metrics (reporting) is not going to be easy (may be an export to excel and then using a macros to explode the values but this a lot of work for something that should be out-of-box)

    Hope this is very high on your backlog

  • @John: Thanks for the feedback. We are aware of the reporting issues, and that is also one of the main reasons why we haven't shipped the control in the box.

    This control is high on our backlog, but we need to have a good reporting story before we ship it.

  • Please ship this in box or in an update. Please fix the reporting story. This would be so nice to have but we can't install stuff from codeplex.

  • Same here, a lot of projects asks about multi select option.

    What about Tags in version 2013? is that reusable Field type/control?

  • This is a major limitation. We want to move from VersionOne to TFS 2013, but are finding a few limitations with the transition. This is one of them. Please add this feature.

  • How to do for Team Explorer Everywhere ?

  • Is there any cascading multivalue control available in TFS 2013 ? Suppose if user selects value from one multivalue control then based on the selection, the values should be filled in other multi value control.

  • @Saran, sorry but the current implementation of the control does not support cascading dropdowns, nor do we have plans to update the control to support it. Feel free to download the source code of the control, and implement the cascading on your end.

  • Hi, does this control enable searching/querying of items based on the values selected?

  • Because the selected values are stored in a text field in the format [value1];[value2] you can use the contains operator in the query to get the results. Not ideal, but it works.

  • Maybe a way to suport metrics is implement many fields in work item as value1, value2, value3, etc. and setup solution to store on these fields instead of text field. Is that a way?

  • We have a problem about the width of dropdown control. When you open the wit on Visual Studio, dropdown control extends. but when you open it on web Access, dropdown seems has a fixed small size. Do you have any suggestion?

Page 1 of 1 (12 items)