Udostępnij za pośrednictwem


How to: Edit Check-In Policies

Administrators of Team Foundation version 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 version 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:

  • Builds   Requires that the last build was successful before a check-in.

  • 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. On the Team menu, click TeamProjectSettings, and then click Source Control.

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

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

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

    • Builds   Requires that the last build was successful before a check-in. This policy type cannot be modified.

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

      Note

      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

Tasks

Walkthrough: Customizing Check-In Policies and Notes

Concepts

Working with Check-In Policies and Notes

Working with Version Control Changesets