Thursday, January 10, 2008

Bug in the TfsWitDisplayNames tool

So HR contacts me yesterday afternoon and says we're going to have a 'displayName' change in Active Directory. Being the TFS Administrator, my heart sunk. I knew this was going to be an issue.

I've actually been through this many times before, yet not with 250+ users. Usually it's just a handful every week. I've been using a tool called TFSLocalize which I believe was a precursor to the new tool TfsWitDisplayNames.

To get the tool you need to call support. It can take a bit to get routed to the correct group. I'd recommend you tell the "router" to look up the KB article number (i.e. 932717) so they know what to do. Or at least ask someone in their group what to do. As usual my experience was a bit rough, but eventually I did get to the 2nd level support group. Once I got there, they were very helpful.

Anyway, like I said we've been through this a number of times in the past so I'm pretty familiar with the issue. The TfsWitDisplayNames tool works pretty well. The documentation is well put together, which helps calm your nerves after you get over the fact you have to map 250+ users.

Here is an observation we had when running the tool with the /d switch, which I think indicates you are accounting for deleted users. The error we get might happen without the /d switch as well, but I didn't test that.

Here is our first mapping file and output. You can see that we have three entries. The first two are for users who are no longer with the company. I mapped them both to me. The third user is an employee who changed business units and thus had his 'displayName' changed.

Mapping File #1
oldValue="Gates, Bill (MyCompany)" newValue="Noland, Mac (MyCompany)"
oldValue="Harry, Brian (MyCompany)" newValue="Noland, Mac (MyCompany)"
oldValue="Hodges, Buck (MyCompany)" newValue="Hodges, Buck (MyOherCompany)"
Output
Processing changes for ...[Field Count : 13; Value Count: 3]
Value: Gates, Bill (MyCompany) -> Noland, Mac (MyCompany)
Value: Harry, Brian (MyCompany)" -> Noland, Mac (MyCompany)
[WARNING]: Skipping update. Value 'Harry, Brian (MyCompany)' for field '' has already been changed.
Processing changes completed.


You can see that by having Noland, Mac (MyCompany) twice in a row, the tool stops after the first update with a warning. Now look at our second mapping. Here I've removed the duplicate and it produces correct results.

Mapping File #2
oldValue="Gates, Bill (MyCompany)" newValue="Noland, Mac (MyCompany)"
oldValue="Harry, Brian (MyCompany)" newValue="Noland, Brock (MyCompany)"
oldValue="Hodges, Buck (MyCompany)" newValue="Hodges, Buck (MyOherCompany)"

Output
Processing changes for ...[Field Count : 13; Value Count: 3]
Value: Gates, Bill (MyCompany) -> Noland, Mac (MyCompany)
Value: Harry, Brian (MyCompany) -> Noland, Brock (MyCompany)
Value: Hodges, Buck (MyCompany) -> Hodges, Buck (MyCompany)
Processing changes completed.


This produced the results we expected, but I think TfsWitDisplayNames has a bug. I sent this back to support so hopefully the duplicate issue will be fixed. In the mean time, you have to remove all duplicates and/or use multiple mapping files. Which unless you've accepted that this is a huge pain in the butt, like I have, may frustrate you even more.

Attention Microsoft: This is becoming a bigger, and bigger, and bigger problem as our TFS instances (currently four) continue to grow. I can safely speak for the 1000+ users we have (or soon will have).

2 comments:

Unknown said...
This comment has been removed by the author.
Unknown said...

Mac,

Thanks for your feedback. We are currently working on addressing this problem completely and not having to run a tool.

We are also investigating the bug in TfsWitDisplayNames tool you mentioned above.

Thanks for all your feedback over email as well,

Sunder Raman