SP1 beta and custom controls



Beta for SP1 is released and it comes with many exciting features for TFS. One of features requests I hear much is Custom Controls feature and it is in this SP1 beta!


 


Have you ever wanted to place your own controls in work item form to provide custom functionality? You can do it now with custom controls feature. From your control the work item reference is available and you could store your data in a workitem field itself or in separate datastore. Also you get full power of work item tracking document objects, so you can do things like opening a work item form from a button in your control. I plan to post more on this feature based on interest I see in forums.


 


Here are few custom control ideas (these are mostly based on feature requests I heard from forums)


 


          Checkbox control: Basic checkbox control to view and edit Boolean field values


 


          Math expression control: This would show result of an expression evaluation and the expression can have field value references. For example, show “Effective Importance” value based on a function of priority & severity field values. Expression specified by form author could look something like: <Control Type=”MathControl” Value=”@Priority * 3 + ((@Severity + 1) * 2)” >


 


          Color control: Will show values in different fore color and backcolors based on express evaluation as in above control. Example usage is to highlight a value in red on highly important item or customer


 


          Web site control: Presently custom controls need to be deployed in each user’s box and that can be painful. This control could solve that problem by moving your custom logic to server piece. Basically this control would show a webpage pointed in work item type xml and will pass work item id references by query string. So if this one control is deployed to user’s box, then custom controls could be authored as web controls without deployment worries. Also, it is nice to show detailed data on a workitem in a separate tab.


 


          Button control: Similar to web site control above, but will call a web service and pass work item data. For example, a web service could do some approval processing etc and then set an Approval field to “approved” and then lets user to change states. Again, having such code in server instead of client enables frequent business logic changes without worrying on deployment.


 


          Multivalue control: A control to accept and show multiple values for a field by showing a list of checkboxes. Example usage is to accept multiple OS values for a test case repro workitem. The values can be stored as comma delimited items in a workitemfield.


 


I am thinking of developing most of above controls (ofcourse if I get time J) and hopefully also create a setup package for end user deployment. I am curious to know what other needs or ideas users have and feedback on usefulness of above controls.


Comments (6)

  1. mlapierr says:

    I want to try out the new custom control feature.

    I have installed the SP1 Beta but I don’t know where to start…

    Could you point me out a sample or give me an idea how to build a new work item custom control?

    Do I have inherit from a specific class, do i have to register my control type somehow, how do I reference it in the work item section of the process template?

    Thanks!

    Mike

  2. narend says:

    Mike, the offical documentation is taking a while, so I posted http://blogs.msdn.com/narend/archive/2006/10/02/How-to-use-Custom-Controls-in-Work-Item-Form.aspx to answer your question.

  3. Last week I posted about the availability of the Visual Studio 2005 SP1 beta. I mentioned that the ability

  4. Hamid Shahid says:

    Hi Naren,

    Are there any plans to release these custom controls for TFS 2010 as well?