Wed Feb 15 2006

This past release of TFS brought us the much needed friendly names in the Team Foundation Client user drop down lists.  Before that change, your WIQL query may have looked like this:

    SELECT [System.Id], [System.Title]     FROM WorkItems WHERE [System.TeamProject] = @project     AND [System.AssignedTo] IN ('UserIdA', ''UserIdB')     ORDER BY [System.Id]
As you can see we are searching for any Work Item assigned to UserIdA and UserIdB.  The user list is delimited by a comma ( this will become important later ).  After the release canidate release that same query may now look like the following:
    ...     AND [System.AssignedTo] IN ('FirstNameUserA LastNameUserA', 'FirstNameUserB LastNameUserB')      ...
The only change to this query was the replacement of the alias with the users First Name Last Name.  This query assumes your Active Directory is setup to display First Name Last Name rather than Last Name, First Name.  If your Active Directory is setup like the latter then your query will look like: > >     ... >     AND [System.AssignedTo] IN ('LastNameUserA, FirstNameUserA', 'LastNameUserB, FirstNameUserB')  >     ... > With that setup the name actually introduces a comma which invalidates the list separator.  This query is now broken.  All is not lost.  We can change the List Separator from a comma to a semi colon. Control Panel -> Regional and Language Options -> Customize, on the numbers tab and you will find the List Separator setting.  Do realize this change may adversely effect other applications which may use the List Separator.   >   Your query will now change as follows: > >     ...  >     AND [System.AssignedTo] IN ('LastNameUserA, FirstNameUserA'; 'LastNameUserB, FirstNameUserB')  >     ... >