Wednesday, October 7, 2009

Limiting the users in the Assigned To field on a Work Item

By default, the Assigned To field on a work item shows all users known to TFS (members of the TFS Everyone group). Most of the time you want to limit this list to the users of a specific Team Project.

To do this export the work item type from your project with the WITExport tool. If you want to assign work items to groups, replace the definition of Assigned To with the following XML. This expands all users and groups defined in the project contributors group in the Assigned To pick list.

   1:  <FIELD name="Assigned To" refname="System.AssignedTo" type="String">
   2:  <ALLOWEDVALUES expanditems="true">
   3:        <LISTITEM value = "[Project]\Contributors" />
   4:  </ALLOWEDVALUES>
   5:  </FIELD>


Afterwards you can import the changed workitem definition by using the WITImport tool.

No comments: