Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I associate a review request with multiple changesets in TFS 2012

Our development process works like this: Every 2 weeks the team lead (me) goes in and reviews everyone's changesets to make sure they are up to the coding standards. I would like to use TFS 2012 to help automate this process.

There are 2 problems with this:

  1. There is no way to submit an unsolicited code review. I can live without this if necessary, I guess

  2. There is no way to associate a code review with more than one changeset. This is a deal-breaker

I read one article which said it's possible to link changesets to a work item after the fact and when I open the work item for the request review I do see the Links tab. However, when I click "New" or "Link to...", there is no option to link to a changeset. There is only an option to link to each work item type in the process.

Does anybody know how to do this? Are there any plans to add these features to TFS?

Here's a screenshot:

No changeset option to be found... :(

like image 866
Doug Avatar asked Dec 17 '12 16:12

Doug


People also ask

How do I apply Changesets in TFS?

In Source Control Explorer, press Ctrl + G. The Go to Changeset dialog box appears. Type the number of the changeset and choose OK. If you don't know the number, choose Find.

How do I find a particular changeset in TFS?

Find a changeset In Source Control Explorer, on the menu bar, File => Source Control => Find => Find Changesets. The Find Changesets dialog box will appear. (Optional) Next to the Containing File box, choose Browse.

How do I open a changeset in Visual Studio?

In Visual Studio a keyboard shortcut can be used for pulling up a specific Changeset or Work Item. Ctrl + G . Enter the number in the Go To Changeset dialog and press OK.


2 Answers

  1. Unsolicited, no.
  2. You can rightclick a changset in the history screen to request a review post checkin.

And there is a nasty workaround to get what you want to achieve. Check out all files you want to review and request a review. You can then undo your checkout, the shelveset and the review request will remain.

Alternatively you can just go to the source control tab and do a checkout-all on the rootfolder of your solution, request the review, undo your checkout and do the review.

As for linking changesets to a Work Item, this can be done post checkin. Open the work item, go to the links tab and click "Link to..." The dropdown there will have a "Changeset" option. But I don't think this link type is enabled for Code Review Requests, since these use a Shelveset and not a set of changesets as the source for the code to review.

enter image description here

I expect you could use the TFS API to generate a shelveset with all the changes from a specific developer in a given timerange, put these on a shelveset and request a review on that. But no existing feature to do that exists.

Or you might be able to edit the shelveset of associated to the review by creating a new one with the same name.

like image 167
jessehouwing Avatar answered Oct 02 '22 11:10

jessehouwing


An alternative approach:

1) at the beginning of the two week cycle, initiate the code review process and note the work item number that is created. Simply request a review from yourself with no code changes at first.

2) Have all your developers associate their check ins for the next 2 weeks with that work item #

3) When you are ready to perform the review, simply open the work item and go through the changesets.

That should accomplish what you want.

like image 45
Andrew Clear Avatar answered Oct 02 '22 12:10

Andrew Clear