TFS & Visual Studio ALM – by Neno Loje

(formerly Team System, VSTS)

Available Check-In Policies for Team Foundation Server 2012

October 15th, 2012 · 2 Comments · Project Management with TFS, Team Foundation Server, Team Foundation Version Control, Tools and Utilities, Visual Studio Online

Shipping as part of Visual Studio 2012:

  • Builds – Requires that build was successful (CI builds) and therefore build breaks must be fixed before a new check-in.
  • Changeset Comments Policy – Requires that user provide comments on check-ins. (new in VS 2012)
  • Code Analysis – Requires that Code Analysis is run before check-in. [More]
  • Work Items – Requires one or more work items be associated with the check-in.

Note: The Testing Policy that shipped with VS 2010 is not longer available.

Added after installing TFS 2012 Power Tools (needs to be installed an all VS clients):

  • Custom Path Policy – Allows you to scope other check-in policies to specific folders or file types.  [See here for how to use it.]
  • Forbidden Patterns Policy – Prevents users from checking in files with filenames that contain forbidden characters or patterns.
  • Work Item Query Policy – Requires that the associated work items need to be part of the result of a specified work item query.

Note: When using an older version of VS (2008/2010) you need to install the corresponding version of the TFS Power Tools (VS 2008 requires 2008 Power Tools, etc.)

Developed by the Community:
  • Code Review Checkin Policy – allows to enforce Code Reviews prior to check-in (by Colin Dembovsky). Get it here.
  • Checkin Time Tracker v3 – allows you to gather effort values from developers during check-in (by AIT TeamSystemPro Team). Get it here.
  • Column Limit Check-in Policy – prevents users from checking in files that don’t comply with your column limit coding style guidelines (by Gambitrex). Get it here.
  • Merge / Branch Only Check in Policy – Block check ins that are not part of either a branch or merge operation (by Leon Mayne). Get it here.

Note: When using an older version of VS (2008/2010) you need to install the corresponding version of the check-in policies (for a list of check-in policies for VS 2010, see here).

What about the "Override Warnings" link?

There might always be an unforeseen reason why not all policies could be fulfilled.

How can I deploy custom Check-In Policies to all team members?
How can I create custom Check-In Policies?:

Do you know another great check-in policy for TFS 2012? Let me know!

–Neno

Updated (May 17th, 2013): Added Merge / Branch Only Check in Policy.

Tags:

2 Comments so far ↓

  • vijay

    I want run some custom validations just before Dev branch is being merged to Main branch. I tried server side plugin buy looks like it is not possible to trap “Branch Merge” event.
    Is there any way I can trap this event? Please help

  • vstsblog

    @vijay: A “merge” is a regular check-in (in TFVC), so you should be able subscribe it and make sure your implementation ignores non-merges.

Leave a Comment