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:
|
| 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:
|