Setting TFS work items to default to be unassigned
Wouldn’t it be nice to have your work items in Team Foundation Server default to be “unassigned”, so that it is easier to determine what jobs are being worked on and what are unallocated?
Well it turns out this is possible.
First of all, you need to export the work item definitions that you want to customise:
cd "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE" witexport.exe /t tfsserver /p ProjectName /n Bug /f c:\Bug.xml witexport.exe /t tfsserver /p ProjectName /n Task/f c:\Task.xml
Now open these .xml files, locate the “Assigned To” field and update it to be the following:
<FIELD name\="Assigned To" refname\="System.AssignedTo" type\="String" reportable\="dimension"\> <HELPTEXT\>The person assigned to do the work</HELPTEXT\> <ALLOWEDVALUES expanditems\="true"\> <LISTITEM value\="\[Project\]\\Project Administrators" /> <LISTITEM value\="\[Project\]\\Contributors" /> </ALLOWEDVALUES\> <PROHIBITEDVALUES\> <LISTITEM value\="Project Administrators" /> <LISTITEM value\="Contributors" /> <LISTITEM value\="domain\\tfssetup" /> </PROHIBITEDVALUES\> </FIELD\>
What this does is limit the users that are displayed in the “Assigned to” drop-down list box to be just the direct project administrators and contributors.
Import these back into TFS:
witimport.exe /t tfsserver /p ProjectName /f c:\Bug.xml witimport.exe /t tfsserver /p ProjectName /f c:\Task.xml
Next, from Team Explorer, right-click on the team project and select Team Project Settings | Group Membership. Click on the ‘New’ button and create a new project group named “Unassigned”. Select the [Project]\Contributors group and add the [Project]\Unassigned group as a member. Now, select the team foundation server from with the Team Explorer, and right-click and ‘Refresh’ to reload the new templates.