Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS "Assign To" is showing too many users

Tags:

tfs

I am connected to a TFS server, and when I create a work item (Bug, Task, etc.), the "Assign To" shows WAY too many users. I cannot find a way to limit the users shown that will affect anyone else who connects to the server.

For example, I have under the "Assign To" dropdown:

Administrator
LOCALE SERVICE
User 1
User 2
User 3
User 4
User 5

I want the "Assign To" dropdown to only show:

User 1
User 3
User 5

How would I do this, so that it changes on the server, and if anyone new connects to the server, they can only see the three users on the "Assign To" dropdown?

like image 792
Landin Martens Avatar asked Aug 02 '12 04:08

Landin Martens


4 Answers

Here's what you should do:

  1. Open the Visual Studio Command Prompt. This will give you a command line window with the PATH set to run VS / TFS tools
  2. Download the Work Item Type definition that you want to modify (e.g. Bug, Task):

    • witadmin exportwitd /collection:collectionurl /p:project /n:typename [/f:filename]

    This will give you the WIT's definition, in XML format.

  3. Open the XML file. You will edit the rules for the Assigned To field. Find the term "System.AssignedTo"
  4. In the Allowed Values rule element, modify (or add if none exists) your List Item element to limit the values to members of one (or more) TFS / Active Directory group(s). Your field definition should look like this:

<FIELD name="Assigned To" refname="System.AssignedTo" type="String" syncnamechanges="true" reportable="dimension">
<HELPTEXT>The person currently working on this bug</HELPTEXT>
<ALLOWEXISTINGVALUE />
<ALLOWEDVALUES expanditems="true" filteritems="excludegroups">
<!-- Below is a TFS group. Note you actually type "[project]" verbatim -->
<LISTITEM value="[project]\Contributors" />
<!-- Below is an AD group. The name and group are examples only -->
<LISTITEM value="MYDOMAIN\Developers" /> </ALLOWEDVALUES>
</FIELD>

Importing your changes:

  1. Save your file.
  2. In the command line window type the following:
    witadmin importwitd /collection:collectionurl /p:project /f:filename

That's it. Your work item type is now limited to the people you want.

like image 83
Assaf Stone Avatar answered Oct 23 '22 21:10

Assaf Stone


See my answer here for 2012, it may be similar: Visual Studio - Don't display all domain users in "Assign To" field

The problem was that [TEAM FOUNDATION]\Valid Users included [TEAM FOUNDATION]\Team Foundation Administrators which included [BUILT IN]\Administrators

In the TFS Server Administration Console I selected Application Tier and clicked Group Membership. I then double-clicked on [TEAM FOUNDATION]\Team Foundation Administrators and removed [BUILT IN]\Administrators.

Now I only see my team and not all the SQL admins and engineers that were local admins on the server. All without any command line or addons.

like image 21
THE JOATMON Avatar answered Oct 23 '22 21:10

THE JOATMON


You can:

1) go here https://teamprojectmanager.codeplex.com/releases and download the latest Team Project Manager;

2) launch it (an *.exe file in the archive);

3) connect it to your project;

4) go to "work item configuration" on the right;

5) then to "work item types";

6) select your item type (Product Backlog Item for instance), click "edit";

7) do what Assaf Stone suggested above, in my case it was just replacing

<VALIDUSER />

with

<ALLOWEDVALUES expanditems="true" filteritems="excludegroups">
    <LISTITEM value="[project]\Contributors" />
</ALLOWEDVALUES>

8) save your changes;

That's it! BTW, the tool can come in handy for some other customizations as well.

like image 4
Kostiantyn Ko Avatar answered Oct 23 '22 19:10

Kostiantyn Ko


After installing TFS power tools for Visual Studio.

  1. From the menu open Tools --> Process Editor --> Work Item Types --> Open WIT (WorkItem) Type from Server.
  2. Select the Collection and the Project and The Work Item that you need to make changes to.
  3. Open the Assigned To field and Click on Rules Tab
  4. Edit the Valid user an add the "group name" which you wanted to display.

Then save the Workitem by selection save in Visual Studio.

Hope this works.

like image 3
hems Avatar answered Oct 23 '22 20:10

hems