TFS code review should not require a new code review to be started when code that is already under review is changed based on review comment
It seems that TFS requires a new code review to be started whenever code that is already under review is updated in response to review comments. It is not only unnecessary busy work for a developer to initiate a new review each time a review comment would suggest a change to the code that is already under review is necessary, but it also prevents having a single picture of changes made as a result of the review process.
With the current method, a single logical code review may span multiple physical code reviews and the comments for the single logical review are fragmented across several physical reviews.
We have a lot of investment taking place on our code review platform that will enable iterative code reviews, and we will initially bring that functionality to Git (via pull requests). Improving iterative code reviews for TFVC is still on our backlog, but it is not in our 6 month plan, so we are resetting the status.
Brendan H. commented
Just a comment that this is working well for us now using TFS Git on premise! We do not use TFVC.
Joshua Drake commented
Abandoning your own products for Git seems to be a self-defeating strategy.
Keith Culpepper commented
Any update on this? I agree that the code review should be updated instead of having to create a new review.
Matt Luceen commented
My team is using the "update shelveset" method posted below and we hit a snag. Here's the scenario and two workarounds for the snag we hit:
1. Person 1 requests a code review from a shelveset.
2. Person 2 finds issues, adds comments, and selects "Finished (Needs Work)".
3. Person 1 makes the necessary changes and pushes them to the same shelveset used in step 1.
4. Person 1 adds a comment to the code review to notify the team that the code is ready to be reviewed again.
5. SNAG: Person 2 reviews the new code and it looks good. However, Person 2 has already finished the code review -- they are unable to select "Finished (Looks Good)".
WORKAROUND 1 - Don't ever finish a code review if the code needs work
Don't ever use "Finished (Needs Work)" or "Finished (With Comments)". If the code needs work, Person 2 should leave a "-1" top level comment on the code review and leave file level comment(s) describing the work needed.
WORKAROUND 2 - Use Excel to reset Person 2's response
1. Open the code review in Visual Studio.
2. Under Actions, click Open Work Item.
3. Click the LINKS tab on the bottom left of the work item.
4. Right-click Person 2's "Finished (Needs Work)" response and open it in Excel.
5. Click into the Assigned To cell and type Person 2's name.
6. Click into the State cell and use the dropdown to select "Requested".
7. Close Excel, clicking Yes to confirm that you want to publish your changes to the team project.
8. Person 2 is now able to select "Finished (Looks Good)".
There is a nice workaround with shelved changes:
Rob Siklos commented
This would definitely be something worth having.
Elvis Miranda Aramayo commented
Exactly my thoughts, we need this feature implemented ASAP, as a code reviewer find myself quite limited without this functionality.
Karim Jou commented
Any update on this? This is a MUST :)
We are very interested in the progress of this code review feature in TFS 2015. Is there a scheduled iteration/date where this feature will be available?
David Burg commented
Brian Harry indicated that this is something that is being worked on for TFVC now that Git has better support for iterative code reviews (see comments on his blog post here: http://blogs.msdn.com/b/bharry/archive/2014/09/03/vs-amp-tfs-2013-update-4-ctp-1-is-available.aspx )
That being the case, can this suggestion please be updated to indicate it has been approved?
Shane Yu commented
As I see it, Code Collaborator (a 3rd part tool) only implements this one feature above a TFS code review, as a result we have been forced to use this 3rd party tool.
The tool is **** and slow, I hate it. TFS rocks, but without this feature we will never be able to properly use TFS.
Get it implemented ASAP!!!!
Matt Slagle commented
I wish this was allowed. Seems many open source and free alternatives already offer this capability. Currently, code reviews seem second class when they should be first class citizens.
Should this be moved to the TFS user voice?
I see at least one suggestion over there that is the same as this: http://tfs.uservoice.com/forums/68845-team-foundation-server-ideas-and-feedback/suggestions/3745137-ability-to-re-review-code
Definitely needed if anyone is considering this as a viable code review mechanism.
A Microsoft contact we worked with did give us one work-around that may be useful for some in the interim:
1. Create a shelveset (note the name).
2. Create a review from the shelveset.
3. Incorporate suggested changes.
4. Create a new shelveset with the same name as in step 1.
5. You will be prompted to overwrite the existing shelveset...go ahead.
6. Make a general comment on the review so reviewers get a notification that you incorporated their changes.
7. Now, users will see your new changes.
The major downside is that you lose the full breadth of the code review as the diffs are only going to show the original and latest version in the code review. Also, the comments may not line up correctly with new changes.
Brian Baker commented
Is anyone from Microsoft watching this one, now that David Starr has left?
Absolutely agree. The current method actually discourages the requester from implementing some or all of the fixes recommended by other developers, or at the very least, it discourages the re-validation of any changes to the code. It can be difficult to track which physical review is the current one, and sometimes near impossible to track a dialog over multiple changes and reviews.
The tool is quite useful due to its ability to review changes with many developers, especially for my team, as we are geographically separated. But an enhancement to modify code in the existing review is greatly needed.
We are using the tool and like it, but would like to be able to respond to a code review with new code and comments.
At the moment we basically close the review and start a new one (as others have said) I would like to be able to do the code review and then make changes to the code and have them attached to the same review. We should be able to see the alternatives side by side. and we should be able to navigate forwards and backwards through the changes.
David Burg commented
Adoption of the VS out of the box code review compared to CodeFlow is difficult when VS' experience just does match the productivity boosting abilities of CodeFlow such as this key capability to do incremental code reviews.
Dustyn Blasig commented
This is a huge hindrance to large feature submissions as these changes tend to require several iterations of review and being able to track comments across changes and check them off as implemented is imperative to ensure quality code. Other products do this well, I'm sure VS can pull it off.
The key features we need are tracking of changes through common operations including not only standard in-file edits but also tracking changes through file renames and merges.