Search code examples
tfsdevopsworkitem

How to disable the check in with out giving the task or bug id


i am using the TFS 2013 version and i want to deny the check ins without giving the work item ids. please suggest me how to make the work item type mandatory.


Solution

  • You should use check in policy to handle your scenario.

    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.

    To create a check-in policy:

    1. From Team Explorer, select the Settings page, then select Source Control under the Project section.The Source Control Settings dialog box appears.
    2. Click the Check-in Policy tab and then click Add. The Add Check-in Policy dialog box appears.
    3. In the Check-in Policy list, select the policy type you want and then click OK.

      In your case, just select Work Items, the policy is added to the list that a work item must be associated with the check in.

    When you are satisfied with the settings for the check-in policies, click OK; the new check-in policy now displays with future check-ins. Others have to select related work item ID in pending changes page, otherwise he will not be able to check in code.

    More details please take a look at this blog: Add Check-In Policies