Condividi tramite


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