MultiValue Control

A ComboBox Control to accept and show multiple values for a field by showing a list of checkboxes.

multivaluecontrol.jpg

Installation
In order to use this control, at two files must be present in the deployment folder:

MultiValueControl.wicc
CodePlex.WitCustomControls.dll

The deployment folder is located at the following location under a default client install: <ApplicationData>\Microsoft\Team Foundation\Work Item Tracking\Custom Controls.

Schema
Fields associated with multivalue control should have list of suggested values and each value enclosed in square brackets. For example:

<FIELD name="Triage" refname="Microsoft.VSTS.Common.Triage" type="String" reportable="dimension">
<HELPTEXT>Status of triaging the bug</HELPTEXT>
<SUGGESTEDVALUES expanditems="false">
<LISTITEM value="[Approved]" />
<LISTITEM value="[Investigate]" />
<LISTITEM value="[Rejected]" />
<LISTITEM value="[Submit]" />
</SUGGESTEDVALUES>
</FIELD>

Then use MultiValueControl as controltype for that field in Form section, for example:

<Control Type="MultiValueControl" FieldName="Microsoft.VSTS.Common.Triage" Label="Triag&amp;e:" LabelPosition="Left" />


Quering
For quering work item based on MultiValueControl field, the control value is treated as a string. To search for items that has a specific list item selected in the MultiValueContorl use the contains operator and don't forget the square bracket when you enter the value. If you are searching for a specific list item selected and only that item is selected use the = operator. If sreaching for item that has more than one list item selected use multipe 'contains' clauses for that field.

Last edited Apr 20, 2009 at 7:23 PM by hayderc, version 4

Comments

FreydieS Dec 29, 2013 at 4:31 PM 
Hello,

Some how it does not work for me:(
I have installed the setup - can not find the dll\ *.Wicc file.
Can some one guide me?
Thanks!!

surese56 Dec 24, 2013 at 2:06 PM 
the assemblies should be placed at
C:\ProgramData\Microsoft\Team Foundation\Work Item Tracking\Custom Controls\12.0.

OS: win7

cesargar Sep 13, 2013 at 7:09 PM 
Any plans to update this for Visual Studio 2013?
I get this error when I try to use the current version with VS2013: TF400939: The custom control type 'CodePlex.WitCustomControls.MultiValueCustomControl.MultiValueControl' does not implement the IWorkItemControl interface or is compiled for a different version of Visual Studio.

tumtum99 Mar 8, 2013 at 4:42 PM 
I am getting this when i try to preview the Work Item template:
Failed to load MultiValueControl control. Value cannot be null. Parameter name: type

tumtum99 Mar 8, 2013 at 2:21 PM 
Hello,
I would like to implement your MultiValueControl However I dont really understand how. I have edited WIT before and added custom controls however I have some questions.

1. What does the the MSI in the zip file do, where is the control installed? What do I do with the other js,css, and xml files included in the download?
2. Does this need to be installed on the TFS server?
3. It says The deployment folder is located at the following location under a default client install: <ApplicationData>\Microsoft\Team Foundation\Work Item Tracking\Custom Controls. But what user is this under? I ran the .msi installer on my workststion but still dont see this path?
Any more implementation information would be very greatly apreciated.
Thank you

tumtum99 Mar 8, 2013 at 1:37 PM 
Hello,
I would like to implement your MultiValueControl However I dont really understand how. I have edited WIT before and added custom controls however I have some questions.

1. What does the the MSI in the zip file do, where is the control installed? What do I do with the other js,css, and xml files included in the download?
2. Does this need to be installed on the TFS server?
3. It says The deployment folder is located at the following location under a default client install: <ApplicationData>\Microsoft\Team Foundation\Work Item Tracking\Custom Controls. But what user is this under? I ran the .msi installer on my workststion but still dont see this path?
Any more implementation information would be very greatly apreciated.
Thank you

loki_rainbow Sep 12, 2012 at 1:59 PM 
Hi, I would like to know if will be an update regarding "MultiValueControl.wicc" and "CodePlex.WitCustomControls.dll" for TFS 2012?

I tried to add a multivalue control in TFS 2012 and I got the below error:
TF400939: The custom control type 'CodePlex.WitCustomControls.MultiValueCustomControl.MultiValueControl' does not implement the IWorkItemControl interface or is compiled for a different version of Visual Studio.

Thanks and Regards.

kmusun1 Jun 18, 2012 at 5:39 PM 
how to get this control show up properly in the web version of TFS ?
I tried to register it with the GAC, but the dll doesnt have the strong name...
Any ideas ?

JeanGe1988 May 15, 2012 at 2:52 AM 
I use this control in Test Case, when I open it in Test Manger, there are 3 problems: 1. The field use this control keeps blinking. 2. The "Save and Close" button is gray. 3. The steps control only shows 2 rows. Does anyone has the solution? Thanks!

leviath0n Sep 1, 2011 at 1:46 PM 
Hey, is there anyway to have this use values from a global list, rather than hard coded ones?

kroto Dec 23, 2010 at 4:54 PM 
Without custom control support for TSWA in 2010, it renders our use of eMailing reports for detailed analysis useless. I mail a report, and I get an error in certian fields so they have no idea what the detail is behind that field. Do you know when Custom Control support will be added for TSWA?
Thx,
Paul

Jethro Apr 2, 2009 at 7:05 AM 
hi, how can i change the "System.AssignedTo" to multi-value , I want only users who are contributors or project administrator of the project will be listed.
<FIELD name="Assigned To" refname="System.AssignedTo" type="String">
<ALLOWEDVALUES expanditems="true" filteritems="excludegroups">
<LISTITEM value="[Project]\Contributors" />
<LISTITEM value="[Project]\Project Administrators" />
</ALLOWEDVALUES>
<PROHIBITEDVALUES expanditems="true">
<LISTITEM value="tfsservice" />
</PROHIBITEDVALUES>
<ALLOWEXISTINGVALUE />
</FIELD>

jonlu Jan 16, 2009 at 2:27 PM 
Hi!
I tried the control and it works nicely but of course it doesn't work on the web client. Have you got any plans to implement web funcitonality or do you know of a version that works on the web client?

Thanks!

Jon

mrzenka Dec 17, 2008 at 3:29 AM 
Is there a way to tie this control to Team System Web Access?

hayderc Oct 3, 2007 at 12:46 AM 
Richard, I've seen this issue before. Take a look at this forum discussion: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=801890&SiteID=1

tangrl Oct 1, 2007 at 8:16 PM 
I tried to add a MultiValueControl to a Work Item Type. When I tried to import it with witimport utility, it gave the following error:
Xml validation error at row 350, column 62: The 'Type' attribute is invalid - The value 'MultiValueControl' is invalid according to its datatype 'ValidControlsType' - The Enumeration constraint failed.

I have SP1 installed on the server and Visual Stuio Team Edition SP1 installed at the Client. I made sure MultiValueControl.wicc and CodePlex.WitCustomControls.dll files are in "AllUsers\<ApplicationData>\Microsoft\Team Foundation\Work Item Tracking\Custom Controls" folder.

Thanks!

Richard.

hayderc Sep 28, 2007 at 1:36 AM 
Thanks Jim, I have update the code and binaries.

-Hayder

mcdubjr Sep 25, 2007 at 5:22 PM 
I had two problems getting this to work. The first problem I had was that I copied the control tag from the example above, but the web brower converts the ampersand tag for the Label attribute.

//correctly formated tag (hopefully I'm using wiki markup correctly)
{{ <Control Type="MultiValueControl" FieldName="Microsoft.VSTS.Common.Triage" Label="Triag&amp;e:" LabelPosition="Left" /> }}

Once I fixed that I was able to import the WIC file but ran into another issue. I revieved this error message when created a new work item:

add_AfterUpdateDatasource' in type 'CodePlex.WitCustomControls.MultiValueCustomControl.MultiValueControl' from assembly 'CodePlex.WitCustomControls, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null' does not have an implementation.

To fix this I modified the MultiValueControl.cs file.
//add this code
{{
event EventHandler IWorkItemControl.AfterUpdateDatasource
{
add { DataSourceEvents.AddHandler(EventBeforeUpdateDatasource, value); }
remove { DataSourceEvents.RemoveHandler(EventBeforeUpdateDatasource, value); }
}

}}

Jim