Search code examples
visual-studiotfstfs-2015

Restrict developers from Code Check-in in TFS 2015


We have states as New --> Approved --> In- Progress --> Resolved --> Done where we want to restrict the developers from checking in the code after they have resolved the task and also restrict them from checking in the code when the task is marked as done. "Done" is the state when the QA completes the testing and finds that the task is working all right. Is there any way to set these restrictions in TFS 2015 or Visual Studio?


Solution

  • The only way that I can think of would be to write a custom check-in policy for Visual Studio to check the state of the work item prior to allowing the check-in to occur. This could be combined with a "requires associated work item" policy.

    However, check-in policies are easily circumvented, as they have to be installed on each developer's machine in order to function, and they only function within Visual Studio.