Pull-request on TFS (guarded) with checklist - tfs

i am wondering if there is a way to incorporate a checklist in a pull-request.
The reviewer shall check some things mentioned on that checklist and enter some result, like 'done' or 'not applicable' or 'found an issue'.
It would be very nice if a not fully answered checklist could block a pull request.
A direct approach could be to paste the checklist as one or several comments.
This one seems tedious, and does not block the PR from completion...
Another approach could be to create a template work-item related to the pullrequest, containing the checklist, or one work-item for each entry in the checklist. Once again tedious and non blocking...
We are using:
Microsoft Visual Studio Team Foundation Server
Version 16.122.27409.2
--> TFS 2018 Update 1

Assume you are using TFS 2017 and later version, then you can achieve that by applying Branch Policies.
Navigate to Admin -> Version Control
(http://server:8080/tfs/DefaultCollection/{Project}/_admin/_versioncontrol)
Select the specific Repository and Branch --> Enable Protect
this branch --> Enable Check for comment resolution -->
Required
Create a pull request, paste the checklist as one or several
comments, Markdown is supported for comments, you can copy the
checklist like below format as a checkbox:
- [ ] check 1
- [ ] check 2
Thus the policy will block pull requests from being completed while any comments are Active. So, you can change the state of the checklist comments to Closed once they are all checked.

Related

How to see the builds & releases from within the PBI / BUG details page?

Currently the links tab of a PBI (or BUG) shows the commits as well as the pull requests but I would like to see the build in which those commits were included as well as the releases of that build (when it was released and to which Server)
In short, is there any way to configure TFS to see the build and release details from within the PBI/BUG Details page?
Currently our approach to find out whether a specific PBI has already been deployed, is to start from the Build and Release menu and to click through all recent releases and their builds until we find the PBI we are interested in. That is not an efficient Approach.
I found this and consider it as the answer to my question.
https://blogs.msdn.microsoft.com/devops/2017/08/25/automatic-linking-work-items-to-builds/

VS Team Services: How to amend a check in? [duplicate]

This question already has an answer here:
Is there a git style amend option in TFVC?
(1 answer)
Closed 5 years ago.
For my project I use VS Team services, linked to Visual Studio 2015.
When I want to check in a new commit, I can do this:
In solution explorer, right click on project
Source Control -> Check In
Enter a comment, click 'Check In'
Now I would like to amend my previous commit, since it wasn't finished completely when I checked it in, in GIT this is possible with the git commit --amend function.
How to do this in VS Team Services? Preferably from Visual Studio itself.
You can't really, there are 2 approaches you can take with TFVC:
Make a second commit and don't worry about it, this is my approach for small typos, etc.
Rollback the changeset, and check it in. Then rollback the rollback and make additional changes and check in again. This is my approach if I totally stuff something up.
Related Question/Answer.
All you can ammend in TFVC is the Check in Comment, this can be done by viewing the change set in VS, editing the comment and pressing "Save".

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: ....

TFS 2012 Disable Multiple Check-out not working [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I would like to disable multiple check-outs for our TFS projects. Here is how I expect it to work:
Bob checks out File1.cs.
Joe double-clicks on File1.cs in his Visual Studio Solution Explorer and tries to modify it buts sees an error message saying that someone already has that file checked-out so he cannot check it out.
I've tried setting it up like this in Visual Studio for both Bob and Joe:
Within Team->Team Project Collection Settings->Source Control...->Workspace Settings Tab I changed the default workspace type from "Local (recommended)" to "Server".
Within Team->Team Project Settings->Source Control...->Check-out Settings Tab I changed Enable multiple check-out to be unchecked.
Within Source Control Explorer->Workspace Combobox->Workspaces...->Edit...->Advanced->Location I changed "Local" to "Server".
Still, however, Bob and Joe can both check-out the same file at the same time. Is there some other configurations options that need to be set?
The issue (as pointed out by Edward Thomson) was that step 3 had not been performed on all of the users' workspaces.
You can also uncheck Enable file merging and multiple checkout in Team Project Collection Settings.
But you have to do this to any type of file you want.
http://msdn.microsoft.com/en-us/library/ms252452(v=vs.100).aspx

How to display Pending Changes as list rather than tree view in VS2012? [duplicate]

This question already has answers here:
VS2012 return to a normal TFS checkin window?
(5 answers)
Closed 9 years ago.
The TFS Pending Changes has moved from its own window to a tab in the Team Explorer.
The pending changes are now displayed as a treeview that reflects the structure of the solution.
How can I display the pending changes as a flat list/grid that can be sorted by various columns?
It's possible to add "TF.exe Checkin" as an external tool, see answer for a similar question.
However it pop-ups after some delay, which is annoying.
I found that if you have only a few recently checked-out files that you want to check-in together, using pending changes tree view is quicker. However if you need to check-in some of many check-out files, "TF.exe Checkin" list is more convenient.
Alternatively try TeamPilgrim Free VS extension -
a replacement for Visual Studio 2012's Team Explorer inspired by the Visual Studio 2010's Team Explorer by Stanley Goldman
After experimentation, I've found it's a link on that page, Show all included changes:
#G_P added this as a comment to a different answer, but I think it deserves an answer slot of its own.
The TeamPilgrim extension includes a replacement pending changes window/tab.
http://visualstudiogallery.msdn.microsoft.com/79e9baa7-ea8b-4335-86ba-ae929bf67222
There is a "pending changes" filter on the Visual Studio 2012 Solution explorer. It will display all your files that are checked out the same as the Team Explorer, but without all the extra garbage about Notes or Work Items.
http://blogs.msdn.com/b/visualstudioalm/archive/2012/08/14/showing-files-with-pending-changes-or-files-that-are-open-in-visual-studio-2012-solution-explorer.aspx

Resources