Solution: TFS always shows ChangedBy as the current user

By default TFS always displays the System.ChangedBy field as the current user. I am Jon Gallant and Wallace Breza is a dev on my team. As you can see he was the last to change the bug, but my name is in the System.ChangedBy field.

This is happening because the work item is put into Edit mode when it is opened and that includes setting the System.ChangedBy field to currentuser. I talked with the TFS Work Item here and they have logged a bug.

Here’s the workaround I’m using.

1) Install the TFS Power Tools.

2) Open the Work Item Template from Tools –> Process Editor –>Work Item Types –> Open WIT from Server

3) Select the Work Item Type you want to update

4) In the Fields tab click New

5) Enter the following information:

Name: LastChangedBy
Type: String
Reference Name: YourOwnNamespace.LastChangedBy
Help Text: Whatever you want to put in here
Reportable: Dimension

6) Click the Rules tab

7) Click the New button:

8) Select COPY. Click OK

9) Set the following values:

From: field
Field: System.ChangedBy

10) Click OK

11) Click the Layout tab

12) Click on the Changed By field in your Layout tree.

13) Over in the details pane to the right, change the “Field Name” property to YourOwnNamespace.LastChangedBy.

14) Save the WIT.

15) Click the Refresh button in Team Explorer

16) Close all your open documents, bugs, queries, etc. There is a local cache that won’t reflect the changes unless you close and reopen.

17) Open up a bug and see that Changed By now equals the last person that changed the bug.

Hope this helps,