Geeks With Blogs
Clara's Notes on Technology Notes to me and the world


Lately I’ve been doing some tests on migrating our TFS 2008 installation to TFS 2010, coupled with a machine and domain change. One particular topic that was tricky is user accounts.

We installed first a new machine with TFS 2010 and then migrated the projects in the old server. The work items were migrated with the projects. Great, but if I try to edit one of the old work items I cannot save it anymore because some fields contain old user names (ex. OLDDOMAIN\user) which are not known in the new domain (it should be NEWDOMAIN\user).

The errors look like this:


When I correct the ‘Assigned To’ field value, I get another error regarding another field:


Before TFS 2010, we had TFSUsers power tool. It allow you to map an old user name to a new user name. This is not available anymore because WI fields with user accounts are now synchronized with AD display names changes (explained here).

The correct way to go about this in TFS 2010 is to use TFSConfig Identities before adding the new domain accounts into the TFS groups (documented here). So, too late for us.

I’ve found a (tedious) workaround to change those old account in work items in order to allow people to keep working with them.

1. Install TFS 2010 power tools

2. Export WIT from your project (VS | Tools | Process Editor | Work Item Types). Save the definition, for example: Original_MyProject_Task.xml

3. Copy the xml (NoReadOnly_MyProject_Task.xml) and edit it. From the field definition of ‘Activated By’, ‘Closed By’ and ‘Resolved By’, remove the following:

       <WHENNOTCHANGED field="System.State">
          <READONLY />

4. Import WIT in VS. Choose the new file (NoReadOnly_MyProject_Task.xml) and import it in MyProject

5. Open all tasks in Excel (flat list). Display the following columns:

  • Asssigned To
  • Activated By
  • Closed By
  • Resolved By

Change the user accounts to the new ones (I usually sort each column alphabetically to make it easier).

6. Publish.

If you get a conflict on a field, tough luck. You will have to manually choose “Local version” for each work item. I told you it was a tedious process.

7. Import original WIT (Original_MyProject_Task.xml) in MyProject. We only changed the WI definition so that we could change some fields. The original definition should be put back.

And what about these other fields?

  • Created By
  • Authorized As

These fields are not editable by definition (VS | Tools | Process Editor | Work Item Fields Explorer), even if they are not marked as read-only in the WIT. You can leave the old values. It doesn’t seem to matter to TFS.

The other four fields are editable by definition, so only the WIT readonly rule prevents us from changing them.


Posted on Wednesday, June 9, 2010 6:58 AM | Back to top

Comments on this post: Accounts in Work Items after migration to TFS 2010 and to new domain

# re: Accounts in Work Items after migration to TFS 2010 and to new domain
Requesting Gravatar...
Good information. Clearly the backup and restore power tools are a great step forward from the original documented way on the MSDN site, but I found some glaring oversights in the documentation for a novice such as myself,
Left by Deri Koltuk on Feb 18, 2011 8:06 AM

Your comment:
 (will show your gravatar)

Copyright © Clara Oscura | Powered by: