When using TFS as part of your ALM solution, you may want certain conditions to occur with every check-in. For example, you may want to force developers to associate work item(s) with every changeset check-in. You are able to accomplish this through the use of the TFS Check-in Policy.
TFS 2012 Check-in Policies are as follows:
- Builds Policy
- Changeset Comment Policy
- Code Analysis Policy
- Work Items Policy
If you download and install TFS 2012 Power Tools, you will also get the following Check-in Policies:
- Custom Path Policy
- Forbidden Patterns Policy
- Work Item Query Policy
In order to use the policies from the Power Tools, each client machine must have TFS 2012 Power Tools installed.
Below are the steps to set up a Check-in policy in Visual Studio 2012:
1) From Team Explorer, select the project and click on the “Settings” option.
2) Select the “Source Control” option
3) Select the “Check-in Policy” tab and click on the “Add” button. You will be presented with available check-in policies.
4) Choose a policy and click the “OK” button.
To add more than one check-in policy to the project, simply repeat steps 3 and 4.