Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

How to: Edit Check-in Policies

Administrators of Team Foundation source control can add and edit check-in policy requirements. These check-in policies require the user to take actions when they conduct a check-in to source control; for example a user can be required to associate a work item with a changeset. For more information on check-ins, see How to: Check In Pending Changes. Before editing a check-in policy, you must first create one. For more information, see How to: Add Check-in Policies. The default available check-in policy types include:

  • Code Analysis   Requires that code analysis be run before check-in.

  • Test Policy   Requires that check-in tests be completed before check-in.

  • Work Items   Requires that one or more work items be associated with the check-in.

Required Permissions

To complete this procedure, you must have the Manipulate security settings permission set to Allow. For more information, see Team Foundation Server Permissions.

To edit a check-in policy

  1. From the Team menu, choose Team Project Settings, and then Source Control.

  2. In the Source Control Settings dialog box, choose the Check-in Policy tab.

  3. In the policy type list, select the policy type for which you want to make changes, and click Edit.

  4. Continue this procedure based on the type of policy you are editing:

    • Code Analysis   Requires that code analysis be run prior to permitting a check-in. The Policy Editor displays when selecting and deselecting rules.

    • Test Policy   Runs check-in tests prior to the check-in. Clicking OK displays the Test Policy dialog box prompting you to select a Metadata file by clicking the ellipses () and then the desired test list. When you have entered the information, click OK. The policy type is added and you are returned to the Source Control Settings dialog box.

    • Work Items   Requires that one or more work items be associated with the check-in. Displays the Work Item Policy Configuration dialog box wherein you can edit the instructions for users that fail to associate a work item with their check-in.


      You can temporarily disable one or more policy types in Source Control Settings, under the Check-in Policy tab, by highlighting the policies and clicking Disable. To enable a disabled policy, highlight the disabled policy and click the Enable.

  5. Click OK.

See Also

Community Additions

© 2015 Microsoft