Add roles to the assigned To field

by Ewald Hofman 4. August 2009 01:28

When you create a new work item, you don't always know who exactly should pick up the work. In that case you want to introduce a role to the work item's assigned to field. To do this, you have to make a modification to the work item:

Step Action
1 Open the command prompt (Run as Administrator)
2 Go to the folder %Program Files%\Microsoft Visual Studio 10.0\Common7\IDE
3

Export the work item with the following command:

witadmin exportwitd /s http:// <server> :<port>/<virtual directory>/<project collection> /p <team project> /n <work item type name> /f <location>
Example:
witadmin exportwitd /s http://MyTfsServer:8080/tfs/DefaultCollection /p TestProject /n Task /f c:\task.xml
 
4 Open the work item definition (in the example c:\task.xml) in Visual Studio or any other xml editor
5

Go to the line

<FIELD name="Assigned To" refname="System.AssignedTo" type="String" syncnamechanges="true" reportable="dimension">
6

Change the line <VALIDUSER/> to

 <ALLOWEDVALUES expanditems="true">
 <LISTITEM value = "[Project]\Project Administrators" />
 <
LISTITEM value = "[Project]\Contributors" />
 <
LISTITEM value = "Role1" />
 
<LISTITEM value = "Role2" />
</ALLOWEDVALUES>

- The VALIDUSER shows all users that have access to TFS in the assigned to field.

- The expanditems attribute ensures that the assigned to field shows all users in the Project Administrators and the Contributors group. When you set the expanditems to false, then the users will not be shown, but only the 4 above groups/roles

- The [Project]\... lines adds the users in those groups to the assigned to field

- The Role1 and Role2 are new roles that are available

7 Save the file
8

Import the new work item definintion with the command:

witadmin importwitd /s http:// <server> :<port>/<virtual directory>/<project collection> /p <team project> /f <location>
 
Example:
 
witadmin importwitd /s http://MyTfsServer:8080/tfs/DefaultCollection /p TestProject /f c:\task.xml

Tags:

VSTS 2010 | Work items

Comments

10/11/2010 6:20:30 PM #

ming

it works for the single word work items. but failed for the multi word work items like Shared Steps. what is the syntax for the export the multi word work item?

ming United States |

10/11/2010 6:33:34 PM #

ming

I figured it out now. I used (“”) to make it to work. Thank you anyway. It is great help for me.

ming United States |

Comments are closed

Powered by BlogEngine.NET 1.6.1.0
Theme by Mads Kristensen


ClusterMap

Widget Statistics not found.

There is an error in XML document (0, 0).X

Recent comments

Comment RSS