Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 - "Recently Finished" Code Reviews showing no results

Our team is using TFS 2015 and Visual Studio 2015 update 2. In My Work under Code Reviews, there is nothing showing up when any team member selects the "Recently Finished" query. I was able to find this Microsoft discussion on the topic:

https://connect.microsoft.com/VisualStudio/feedback/details/1777064/recently-finished-code-reviews-is-empty-in-vs2013-and-vs2015-after-update-to-tfs-2015

But it doesn't really help us. We've already upgraded to 2015 update 2, which is supposed to fix the issue. None of us have any special characters in our names, and all of our names are unique - two things which are cited as causing problems.

As suggested by a user on that thread, when I edit the query to use my actual name instead of "@Me" it works, but this doesn't explain why @Me isn't working and I can't find anywhere to change the default behavior, so it has to be edited each time I want to pull up completed workflows. It is also considerably less user friendly to browse code reviews in the query editor as opposed to Team Explorer.

Anyone have any thoughts on what our issue might be?

like image 463
M Dinkel Avatar asked Nov 08 '22 12:11

M Dinkel


1 Answers

I observed the same behavior is Visual Studio 2015 and Visual Studio 2017 with Visual Studio Team Services.

If you're using an on-prem installation of TFS you can modify the process template to work around this issue as described here.

  1. Perform the witadmin changefield command to set the SyncNameChanges value true for the collection

    witadmin.exe changefield /collection:collectionurl /n:"Microsoft.VSTS.Common.ReviewedBy" /syncnamechanges:true
    
  2. Export the Code Response work item template from the team project

    witadmin.exe exportwitd /collection:collectionurl /p:projectname /f:workitem file path /n:"Code Review Response"
    
  3. Replace the field definition in the work item from VSTS.Common.ReviewedBy and Microsoft.VSTS.Common.ClosedBy with the line below

    <FIELD name="Reviewed By" refname="Microsoft.VSTS.Common.ReviewedBy" type="String" syncnamechanges="true">
        <ALLOWEXISTINGVALUE />
        <VALIDUSER />
    </FIELD>
    <FIELD name="Closed By" refname="Microsoft.VSTS.Common.ClosedBy" type="String" syncnamechanges="true" reportable="dimension" >
        <ALLOWEXISTINGVALUE />
        <VALIDUSER />
    </FIELD>
    
  4. Import the Code Review Response work item back to the team project

    witadmin.exe importwitd /collection:collectionurl /p:projectname /f:workitem file path
    

If you're using Visual Studio Team Services, modifying the process template isn't an option so I created a bug here:

https://developercommunity.visualstudio.com/content/problem/46873/microsoftvstscommonreviewedby.html

like image 149
Michael Baker Avatar answered Jan 04 '23 02:01

Michael Baker