Renamed or deleted AD user prevents work item to save

by Ewald Hofman 31. August 2009 00:43

When a user is removed from AD, all work items the user has created and/or changed can't be saved anymore. To overcome this issue, you can do the following

Step Description
1 Download the TFS 2008 power tools from http://www.microsoft.com/downloads/details.aspx?FamilyID=00803636-1d16-4df1-8a3d-ef1ad4f4bbab&displaylang=en 
2

Create a new xml file with the following contents:

<?xml version="1.0" encoding="utf-8" ?>
<TfsWitDisplayNameChanges>
  <!-- List of field reference names to update. -->
  <Fields>
    <!-- Core "Person" Fields -->
    <Field refName="System.AssignedTo" />
    <Field refName="System.ChangedBy" />
    <Field refName="System.CreatedBy" />
    
    <!-- Non-Core "Person" Fields -->
    <Field refName="Microsoft.VSTS.Common.ActivatedBy" />
    <Field refName="Microsoft.VSTS.Common.ClosedBy" />
    <Field refName="Microsoft.VSTS.Common.ResolvedBy" />
 
    <!-- Add any custom "Person" fields here. -->
  </Fields>
  
  <!-- List of old and new values. -->
  <Values>
    <!-- Display name format changes. -->
<Value oldValue="Doe, Jane" newValue="Jane Doe" deleted="false"/>
 
    <!-- Display names for a deleted user -->
    <Value oldValue="John Q." newValue="John Q. Public" deleted="true" />
 
    <!-- Someone gets married and their name changes. -->
    <Value oldValue="Amy Smith" newValue="Amy Jones" deleted="false"/>
 
    <!-- Add additional Value elements here. -->
  </Values>
</TfsWitDisplayNameChanges>

 

3 Change the mapping file, so it reflects your own users
4 Save the mapping file
5 Open a new command prompt, you must start the command prompt with a user account that has access to the TFS databases
6 In the command prompt change the directory to %Program files%\Microsoft Team Foundation Server 2008 Power Tools
7

type the following command:

tfsusers.exe update /server:<tfsserver> /mappingfile:<location of mapping file>

Now the database has changed all entries in the work item of the old username to the new user name. It is not ideal, but you can at least save your work items again.

You might consider to not delete user accounts from AD, but to disable them to not be forced to do this action every time.

Tags:

VSTS 2008 | Work items

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