Mike's Blog


Business Intelligence keeps me live and communicating!

TFS Check-In Policies Pack

There was a recent TFS Version Control Blog post which asked the community for feedback regarding TFS Version Control Check-In policies. The feedback questions were as follows:

  1. Would you like us to release a check-in policy pack together with some best practices and ship that out of band?
  2. If we do decide to do this then the next question becomes which policies are customers writing themselves that we can standardize and put in the pack?
  3. Which policies would customers like to see as examples?

The TFS Version Control Blog is ran by Mario Rodriguez who is a program manager on TFS Version Control. A couple of weeks ago he announced a small release-out of band- of new check in policies. The pack will contain four policies and they will also distribute the source code so you can use it as a reference.

Check-in policy granularity: there is one already in Code Gallery and what we will do is package this, change some of the UI and take out some of the complexity

Work-Item Associations: This is a very cool one that I hope many of you will find useful. You get to specify a query and if the associated work items by the developer are not part of the query results the check-in is blocked. This is very useful when it comes to making sure that check-ins are always associated with approved bugs.

Banned files: this policy allows you to specify a file extension or a regular expression in order to keep files that you don’t want out of version control. This is usually used for dll’s, build artifacts, or some website files that are automatically generated.

Check-in Comments: this policy gets shipped as part of the SDK. It looks at the check-in comments and makes sure it is not blank.

Some other cool Check-In policies already on the market are, not in any particular order:

Check for Comments: same as Check-in Comments.

Time That Task: gathers hours worked on a task during each check-in. This policy requires check-in to be associated with only one task that is in an "Active" status. It also gathers the number of hours worked on the associated task incrementing the completed hours and decrementing the remaining hours.

Code Review Workflow: doesn’t allow a check-in unless it has an associated Code Review work item (is included too), and that work item is set to approved. Only people in a TFS group named {Project}\Code Reviewers can set an item to approved.

Build Status: gets the last build status and validates a particular build type was actually passing before you check-in. 

Custom Path: a mechanism that allows you to specify the source control path(s) that a particular policy is allowed to act on. This will allow for example a single Team Project to have one set of Code Analysis rules for a particular folder and completely different set of rules for another folder.

Summary
As you can see there are some great Check-In policies available. All of them are open source and I'll hope they soon will release this pack too on connect or codeplex.

Comments

Stephan Dekker said:

Great policies! The one I'm wondering about is the "Time that task" policy. I think this will only work when people do not get interrupted in their task, witch (I think) is rarely the case. So the tasks that use the policy have to be small task of a couple of hours, like small bugfixing or something. But you never know upfront how long it will take. I's cool that developers do not have to keep track of their timesheets amd we all know the burden of that, right? For this kind of task I'm thinking of a way to either: - Pause the task - Easely correct the time spend for the task (While checking in or something) I will also post these suggestions to Microsoft, btw.
# November 26, 2006 12:27 AM

martin.hinshelwood said:

Fantastic! Would the "Time that Task" not be better as seperate system tray application that the developer can pause! The could also choose what task that they are working on!

# December 19, 2006 2:29 AM

Dennis van der Stelt said:

First, if you've got a task and must perform the task in 16 hours, how do you explain 6 interuptions of 30 minutes each, resulting in 3 hours extension to the task? Are you going to report you've worked 19 hours on it?

Probably not. You're still writing 16 hours, it's just your personal problem that you've got 3 hours less to work on the task. Or you just juggle a bit with the hours and write an extra hour or 2 on meetings or anything.

# January 11, 2007 6:48 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Please add 8 and 6 and type the answer here: