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

15,607

Solution 1

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

Solution 2

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.

Solution 3

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.

Share:
15,607

Related videos on Youtube

Simon White
Author by

Simon White

Updated on June 25, 2022

Comments

  • Simon White
    Simon White almost 2 years

    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.

  • Itison
    Itison almost 11 years
    Thank you! I was looking for this for quite a while. You would think that where it says, "... added a comment" in the history, it would perhaps make sense to provide a link to the comment.
  • mattherman
    mattherman about 8 years
    However, the "Recently Closed" option will only show you code reviews up to a certain date in the past. I'm not sure how far exactly, for me it seems to be about a month. So if you are looking for anything from a year back or something you are likely not going to find it this way.
  • Louis
    Louis about 8 years
    @mattherman - That's true. This is intended as a quick short cut. I had written "If you do not perform many code reviews", thinking back then it would only show up to a certain number of reviews at once and overwritte them with newer reviews eventually. Your suggestion that it is based on a timeline is probably more accurate.
  • user735232
    user735232 over 6 years
    In VS 2017, I had to go into Tools -> Options -> Work Items and change "Open work items in" to Visual Studio instead of the default browser to see the link in Step 5. Otherwise, it opens the work item in my browser (where there is no such link to "Open Code Review in Team Explorer")
  • CJBS
    CJBS almost 6 years
    FYI: There's a comment under this setting indicating --- Note: The work item form in Visual Studio (compatibility mode) will be deprecated in the next major version of Visual Studio
  • riQQ
    riQQ about 4 years
    In VS2019 you need this already for step 2 to see New Query in Team Explorer > Work Items.
  • ruffin
    ruffin over 3 years
    To add to @mattherman's comment, it also doesn't show me, at least, CRs abandoned by others. Maybe that's neither finished nor closed, but I do need to see them at times. Simon's answer includes these.
  • ruffin
    ruffin over 3 years
    @Itison I'm betting you already knew (and realize it's seven years later), but it appears there's an "Open Code Review in Team Explorer" link at the top of the display that will show the comments. Tedious and bad UI, yes, but at least they're still there, somewhere...