Visual Studio Team System (VSTS) Blog - by Neno Loje

Neno's Blog about Team Development and Software Quality with Microsofts ALM platform - since 2005

News

Recent Posts

Community

Tags

Email Notifications

VSTS Blogs

VSTS Sites

VSTS Community

My Other Blogs

German VSTS Websites

Archives

Creating a separate work item form layout for Web Access

Right now custom work item controls [1] are not supported by Team System Web Access [2]. Instead your custom control you will see this unpleasant message: “Unable to create workitem control ‘ControlName’”.

Error message when opening a work item with custom controls on the web

While this is a sad thing for us users does that mean that we shouldn’t use Web Access? No, of course not…

One solution is to create a separate work item form layout for Web Access and remove all custom controls from it. (thanks to Serkan and Marcus for pointing me in that direction.)

All you need to do is duplicate the <layout> information in your work item xml file.

Let’s do it

The first section gets a target-attribute with the value “WinForms” like this:

<Layout Target=“WinForms”>

The second targets the “Web”:

<Layout Target=”Web”>

Last thing you need to do is change the “Type” attributes of all controls in the web layout to use “FieldControl” instead of your custom control.

Review the results

If you take my Priority Control example from [1] it would look like this:

Windows layout (in Team Explorer) will show the friendly priority list (= the custom control):

A Work Item Custom Control in Team Explorer

Web layout in Team System Web Access doesn’t show the control, but instead it displays the regular field control. Not nice, but usable – and much better than the initial error message we had.

Regular work item field control in the web

[1] http://msmvps.com/blogs/vstsblog/archive/2007/07/07/starting-using-custom-work-item-controls.aspx

[2] http://msmvps.com/blogs/vstsblog/archive/2007/08/27/free-add-on-team-system-web-access-tswa-power-tool-by-microsoft.aspx