Peer Code Review with Team Foundation Server 11 – Part 2

Back to Part 1

Action: Request a Review

Although the code review feature is work item-based, you cannot create these work items as you would a User Story or Task. There are two means to initiate a code review:

1. Requester must have some pending changes in order to request a review.

2. Requester selects a committed changeset from Source Control Explorer.

NOTE: Because I believe it will be the more popular means of requesting a review, the first method is the workflow this post will focus on.

In My Work, under In Progress, click the Request Review hyperlink to navigate to the New Code Review pane.

The reviewer must enter at least one reviewer, but he/she can enter as many as they would like.

Requesters can also choose from a list of recent reviewers by clicking the arrow next to Add Recent Reviewers.

The Subject field will default to the Title field of the In Progress task, but it can be edited to provide more clarity.

The Area Path field can be used to associate this code review with a particular team, product, or component.

The Description field is not required, but it can provide some guidance to reviewers to ask a question or focus on a particular area.

Notice the code review is already associated with the In Progress work items to provide additional context to reviewers.

Don’t forget to click Submit Request before navigating away from this pane!

The pending changes will be automatically shelved.

At this point, a Code Review Request work item is created with the Title field matching the Subject entered. The initial State will be Requested with a Reason of New. The Assigned
To field will be the requester.

Child Code Review Response work items will be created for each selected reviewer. They too begin with a State of Requested and a Reason of New. However, each work item’s Assigned
To field is set to the name of the reviewer. At any point in time, the requester can add additional reviewers too.

Proceed to Part 3

Advertisements

Posted on April 10, 2012, in ALM, TFS, Visual Studio. Bookmark the permalink. 5 Comments.

  1. Having trouble getting this to work because we’ve modified our other work items to include a Team field that is required. However, we can’t edit this form to provide that value.

    • Yes, the UI in the Code Review pane isn’t editable. You can add/edit fields and the layout for the Code Review Request and Code Review Response Work Items, but those changes will only show in the actual work item views. Write a work item query for these to see what I mean.

      Have you considered adding your ‘team’ to the ‘area path’? That’s what it was designed for. It’s very common to see area paths like ‘[Team Project]\[Team Name]\[Owned Product A]\[SubSystem 1]’. I wouldn’t go any deeper than that unless you really need to.

  2. Jon Stalnaker

    We avoided that route due to have 4 Teams and a crap ton of Areas. It might be what we end up doing though as this is unusable.

  1. Pingback: Peer Code Review with Team Foundation Server 11 – Part 1 « Jeff Fattic

  2. Pingback: Peer Code Review with Team Foundation Server 11 – Part 3 « Jeff Fattic

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: