Can I make a code review in TFS without a request? - tfs

Can I perform a code review of my peer's check-in in TFS without an explicit request?
In other words, if I've got a notification about check-in, can I make a comment after having viewed a differences if I feel like they are needed?
I cannot see such an option inside web diff view linked from a notification email. And it looks like there's no mentions about such option and/or workflow in TFS documentation.

In Visual Studio 2012, go to Source Control Explorer and view the history for an item or folder. When you see the list of changesets, right click one of them and select the 'Request Review' option

Sounds like you are after lightweight code commenting. This is available now in TFService and will be part of TFS 2013 on-premise.

Take a look at Review Assistant - an alternative code review tool to built-in one.
It's well-integrated into VS, so you won't experience a major UX shift.
It supports adding "ad-hoc" comments while browsing the code of your peers. And it's not necessary to request a review in this case.

Related

Is it possible to customize TFS to provide user friendly forms for registering bugs?

I need to let users register bugs similar to how it is done in Bug tracking systems.
I'd like to create user friendly form with a layout which will guide user. Standard Create New Workitem interface is too overloaded for users.
Today we manually look through inbox and register bugs in TFS ourselves. This is really a pain. Users often do not mark the message in subject as a bug. You need to read it to understand user has a problem. Sometimes you need to ask them about the criticality level and what the deadlines for fixing it are.
It is easy to miss important message and this process distracts from main activity.
(Based on you having Visual Studio and having already connected to TFS in there)
In Visual Studio, via the menu, choose Tools > Process Editor > Work Item Types > Open WIT from server
EDIT: You will need to install the Microsoft Visual Studio Team Foundation Server 2015 Power Tools Extension in Visual Studio to gain access to that menu option above
You will then be presented with a popup box. At this point you will need to navigate to the Project Collection you wish to make changes in. Once selected you will then be presented with a list of forms you can edit. e.g. Task, Bug, Code Review etc.
If you select Task you will then be taken to a form where you will have 3 tabs. Fields, Layout and workflow. From here you have a certain level of customisation available.
I found a couple of articles (below) around customising templates. One is for TFS 2015, the other is for TFS 2013.
http://blogs.msdn.com/b/visualstudioalm/archive/2015/12/10/adding-a-custom-field-to-a-work-item.aspx (TFS 2015)
https://www.simple-talk.com/dotnet/visual-studio/customizing-team-foundation-server-2013/ (TFS 2013)
NOTE: Menu option Open WIT from server will make changes directly on the server. There are other option where you can make changes locally, then import those changes in. The above is just a way to get you to the screen to customise the forms so that you can take a look around.

how to update existing shelve set in tfs

My team is using shelving for code review, for X++ code. Which is not a native visual studio language. So you can consider like we storing text files in TFS.
For code developer create a shelve and send it over to the team to reviews it and send feedback. But when the developer address the comments and generates another shelve the comments are lost.
For the reviewer,it becomes difficult if there original comments were addressed or not. The only way is compare 2 shelve code on 2 screen, which is a pain.
This function is not supported by now.
Visual Studio Team (Product Team, Microsoft) responded · March 11,2015
Thanks for the suggestion! We’re currently in the planning
process for enabling an iterative shelveset experience. We’ll update
this item when we have more details.
Source: VS UserVoice
If you just want to replace the exist shelvest(will lose comment either), a trick way can be used: create a new shelf with the same name and then confirm "Replace shelveset"
If you want to check the old comment, I suggest you can use Email Alter in TFS. After setting it, you will get a E-mail notification including detail information of the code review. A sample as below:
Updated
Also agreed with Wouter de Kort and Vicky. The biggest advantage of code review in TFS is that you can suspend and resume your work anytime. No need to pay attention to shelvest.

Using TFS 2013 code reviews with alternative source control

We're using TFS for our day-to-day work management, but are currently unable to use it for source control - we're using SVN instead.
I would like to nonetheless ensure that all our work items have been code reviewed before being closed, and that any code review actions have been followed up on. Any recommendations on how we can keep track of this using TFS with minimal manual steps?
I am also concerned with ensuring that the code review step has not been skipped, and auditability of whether it has happened and whether all resulting actions were closed off. If I look at a closed task, how can I easily tell that a code review occurred on it?
(Optional) Require that every SVN change refer to a work item number in TFS with the check-in comments.
The work item in TFS has a "LINKS" tab on it. As soon as the code is checked in, another work item of type "Task" (or whatever you want to use for code reviews) should be created and linked to the primary work item on this LINKS tab to request the code review for that work item. It should refer to the SVN revision number(s) that need(s) review.
I'm not very familiar with SVN, but I assume there is a way to have branches that could be used as follows. Maintain a separate branch for reviewed code. Only code reviewers can merge into that branch. The only way code can get in there is if the proper work item in TFS exists, and a code reviewer approves and merges the code for it. I'm used to Mercurial and TFS where merging code is really easy. If merging is not easy in SVN, a different solution may be required.
If the linked task exists on a work item, then you know that the code has been checked in and code review is in process. If the link exists, and the linked work item is resolved, then you know the code review is complete. If the link does not exist, then you know that code has not been checked in for this work item (or at least it's not in the reviewed code branch, and has no intent to be there).
We have decided to edit the TFS workflow to include an extra 'In Review' state after 'Resolved'. This allows us to use the existing task board without any overhead of creating separate review tasks, or having to edit the task title to be 'in review: ....

Is there a web-based tool to allow users to submit work items?

I'm aware of the stand-alone Work Item Manager from Telerik, and an outdated project on Codeplex that doesn't work with TFS 2010.
Are there any other tools that end-users to easily enter bug-reports and have them submitted to TFS as work items? Something web-based would be preferrable, but i'd be ok with stand-alone.
WIM looks nice, but it's a little too much for end users to simply submit bugs. And they're not in TFS and don't have Team Explorer. So what other options are there?
Like John said in his comments, there is Web Access (http://mytfsserver:8080/tfs/web) which you can use to report bugs. It is even possible to let external users to create new bugs and track them without needing a CAL (license): http://msdn.microsoft.com/en-us/library/cc668124.aspx
You can give users a url that opens a new bug form and prepopulates some values for them: http://www.ewaldhofman.nl/post/2009/05/06/Initial-values-in-a-work-item.aspx
Usersnap for TFS is exactly what you need.
Add Usersnap to your web project and connect Usersnap with TFS - you will get bug screenshots directly added to your TFS tickets as attachment:
Your users don't need to login and you don't need any CALs for them.
Full disclosure: I'm CTO and Co-Founder of Usersnap.
If you have a Team Project SharePoint site associated with your TFS project, you can even use the shipped and ready to use SharePoint Product Backlog webpart that comes with the Agile process template to enter new Bugs. Very low threshold and little pre-requisites for users.

How to view code difference by changeset in TFS through a web-based interface?

Is there a way to look at code differential between previous and current versions of a changeset in TFS 2005/08 through a web-based interface?
I am aware of Changeset.aspx with a artifactMoniker parameter that retrieves the changeset and related files. But I would also like to view the code delta in a web based manner.
This can be achieved in TFS 2008 via the Visual Studio Team System Web Access.
First you need to open an individual Changeset details. This can be done for example by looking at a build (the Builds tab), and selecting one of the changesets associated with the build.
For some reason the version of Web Access I currently have at hand had a bug in that the link into a Changeset webpage is missing the changeset number. A quick manual fix of the URL helped.
This is the URL that is linked to
http://tfsappserver:8090/UI/Pages/Scc/ViewChangeset.aspx?changeseturi=vstfs:///VersionControl/Changeset/8695
Notice I needed to add the changeset parameter manually.
http://tfsappserver:8090/UI/Pages/Scc/ViewChangeset.aspx?changeseturi=vstfs:///VersionControl/Changeset/8695&changeset=8695
The page lists all the code files that has changed and for each file you can compare it with another version. The comparison option is available from dropdown menu on the file.
Here is what it looks like:

Resources