4
votes

The Team Explorer in Visual Studio provides a dropdown selector for specifying which state of code reviews one wants to list. The available choices are:

My Code Reviews and Requests (open)
My Code Reviews (open/mine)
Incoming Requests (open/others)
Recently Closed (closed)
Recently Finished (finished)

(I have annotated each entry above with the state and ownership for clarity.)

Regardless of which state a given code review is in, if someone posts a new comment to that code review all recipients will receive visual notification in Team Explorer by emboldening that code review in the list (just like new messages in Outlook are emboldened).

The problem is this: I keep the list open to My Code Reviews and Requests most of the time, so I would never notice if someone posted a comment on a finished code review. Finished in the context of code reviews simply means I have finished posting my comments to the review, but I am still interested in seeing what other reviewers have to say.

There are a couple workarounds:

  • Switch over to outlook and check my inbox (or the folder where any code review notifications are auto-moved to).
  • In Team Explorer, switch over to Recently Closed or Recently Finished frequently.

But both of those are interruptive of my work flow. Is there anyway to see all new messages at one time, regardless of the state of its code review?

1

1 Answers

4
votes

Within "Team Explorer" is a Code Reviews section that contains an "Open Query" option which allows you to create your own query using the Work Item Query Language.

Here's a query which will return all the code reviews ever assigned to you or reviewed by you and that you have been involved with over the last two weeks regardless of whether they're closed:

Team Project = @Project
AND ("Work Item Type" In Group "Code Review Request Category"
  OR "Work Item Type" In Group "Code Review Response Category")
AND ("Assigned To" = @Me
  OR "Assigned To" Was Ever @Me
  OR "Reviewed By" = @Me
  OR "Reviewed By" Was Ever @Me")
AND "Closed Date" >= "@Today - 14")

And because the UI is a bit difficult to understand at first, here's what it looks like within the UI:

TFS Query within VS-2013

Some of the above conditions may actually be unnecessary -- for example, the "Was Ever" assigned to condition may also include currently assigned to, though such behaviors should be easily discoverable.

If you have the Contribute permission you can then save this query to TFS's Shared Queries to share with your teammates.