Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I view comments from an earlier code review in Team Foundation Service?

I'm using Microsoft's online Team Foundation Service with Visual Studio 2012 Premium.

I performed a code review for a colleague a couple of months ago, and now another code review has come through for the same project.

I want to be able to view the comments I made on the first code review to make sure everything has actioned. However, I can't find anywhere in Visual Studio or TFS that shows me the previous code review's comments.

like image 606
Simon White Avatar asked Apr 22 '13 12:04

Simon White


People also ask

How do you handle code review comments?

If a reviewer says that they don't understand something in your code, your first response should be to clarify the code itself. If the code can't be clarified, add a code comment that explains why the code is there. If a comment seems pointless, only then should your response be an explanation in the code review tool.

What is code review in TFS?

TFS Code Review Review Assistant is a convenient tool that integrates with TFS and allows you to perform iterative code reviews directly within the Visual Studio IDE, while supporting work scenarios that are not covered by the Microsoft's built-in code review tool.

How do I open code review in Visual Studio?

In visual studio, in the Team Explorer panel click on Pending Changes. Click on Action and select Find Shelvesets. Enter your username in the research box. In the list click on the code review you want to open.


3 Answers

OK, I've found my answer by trial and error:

  1. In Visual Studio 2012 open the Team Explorer
  2. Under Work Items, click "New Query"
  3. Run a query to find the relevant code review item
  4. In the query results, double click the code review work item
  5. Click "Open Code Review in Team Explorer (top left)
  6. The code review will open in the Team Explorer panel
like image 84
Simon White Avatar answered Oct 16 '22 15:10

Simon White


If you do not perform many code reviews, this may also be easier: In Team Explorer, under My Work, there is a Code Reviews section near the bottom. A subtle drop down menu can let you pick other choices, such as:

  • My Code Reviews
  • Incoming Requests
  • Recently Finished
  • Recently Closed

If you select "Recently Finished", you should be able to view your completed code reviews and pick the one you want from there.

like image 43
Louis Avatar answered Oct 16 '22 14:10

Louis


In Visual Studio 2017 the link Open Code Review in Team Explorer might not appear. To display the link on code review work items go to the following starting from the main menu:

Tools -> Options -> Work Items

Change Open work items in: from Default browser to Visual Studio.

Now you can execute queries on work items of type Microsoft.CodeReviewResponseCategory or Microsoft.CodeReviewRequestCategory and the link should appear in the top left corner of the work item.


Thank you user735232 for your comment, I added this as answer to make the solution more visible.

like image 3
Igor Avatar answered Oct 16 '22 13:10

Igor