by Ewald Hofman
6. May 2009 04:50
With the introduction of TFS 2008 SP1 it is possible to prefill the values when you create a new work item in Team System Web Access (TSWA) and Work Item Web Access (WIWA). You can achieve this by adding the value intial values for the fields of the work item in the url.
http://Server:Port/wi.aspx?pname=Project&wit=Type&[Field1]=Value1&[Field2]=Value2
Replace the following arguments by using values specific to your project requirements.
| Server |
Name of the server that is running Team System Web Access |
| Port |
Port number that Team System Web Access is using (default 8090) |
| Project |
Name of the team project where the work item will be created |
| Type |
Type of work item to create |
| Field |
Name of a field to assign an initial value |
| Value |
Initial value to assign to the field |
You can specify initial field values in any order. The following example is a URL that creates a bug that has "Tell what did you encounter" as its title and "MyTfsServer\MyArea" designated as the Area Path:
http://MyTfsServer:8090/wi.aspx?pname=MyTeamProject&wit=Bug&[Title]=Tell what did you encounter&[Area Path]=MyTfsServer\MyArea
There is an easy way to get the url for the work item template. When you create a new work item in Team System Web Access, there is a button available "Copy Template URL" to get the url that reflects the changes you made to the work item.

How to achieve it in Team Explorer?
In Team Explorer you can achieve this also by making use of the
Power Tools of TFS 2008. In the Power Tools there the Work Item templates are introduced.
To create a work item template, open a new work item and fill the fields that should be applied into the Work Item template. Then right click on the canvas of the work item and select Capture template. The template is not availble under the Work Item Template node in the team explorer. You can now use the Work Item template.
3399cd67-a4e6-46c0-94c1-0ef5a34ef80a|1|5.0
Tags:
Work items