TFS & Visual Studio ALM – by Neno Loje

(formerly Team System, VSTS)

Creating a separate work item form layout for Web Access

August 29th, 2007 · No Comments · Team Foundation Server, Team System Web Access (TWA), TFS 2005, TFS Administration, TFS Process Customization, TFS Tips and Tricks, TFS Work Item Tracking, Work Item Customization

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




No Comments so far ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment