Collaborator provides special triggers that fire when someone submits files to a folder that is controlled by a gated check-in process in Team Foundation Server:
Ensures that a review has been started (created in Collaborator) for the submitted changelist.
Ensures that a review has been completed for the submitted changelist.
These triggers ensure that files cannot be submitted unless a review for the respective changelist has been started (or completed). If the conditions are met, the commit will be allowed to continue normally.
The triggers work for Microsoft Team Foundation System 2015 and 2013. Currently, Update 1 and Update 1 Release 2 of Team Foundation System 2015 are not supported.
The triggers are implemented by dynamic-link libraries that you can download from the SmartBear web site as a .zip archive:
To install the triggers you will need to perform the following steps:
1) Download the .zip archive from the page mentioned above and unpack it to some folder on your computer.
The archive includes the dlls folder that have the dynamic-link libraries for the supported Visual Studio versions. Also, the archive includes a README file with instructions similar to those you can see below.
2) Open <Team Foundation Server>\Application Tier\Web Services\web.config file and append the following lines to the <appSettings> section:
<!-- The following settings are for Collaborator triggers -->
<!-- Required setting -->
<add key="collab:serverUrl" value="http://yourcollabserver:port" />
<!-- Required setting -->
<add key="collab:userName" value="collabUser" />
<!-- Required setting. For an empty password, use value="" -->
<add key="collab:userPassword" value="collabPassword" />
<!-- Optional setting. Default is "started" -->
<add key="collab:triggerType" value="completed" />
3) Copy the following DLLs from the unpacked dlls\<Your-Visual-Studio-version> folder to the <Team Foundation Server>\Application Tier\Web Services\bin\Plugins folder:
Linking Reviews and Commits
To use the triggers, you must require developers to put the review ID somewhere in the TFS commit message. The review ID must be specified in the Review: NNN format, where NNN stands for review number. Here is an example:
Commit message example:
TFS: Add support for gated check-ins (Review: 12345)
Collaborator uses the (@"Review:*\s?(\d+)") regular expression to extract the review id from the commit information. This text can appear inline with other text or in a more formal "form-style" layout.
If you run across any issues or problems, it will help SmartBear technical support if you send in a debugging log. To capture a debugging log:
1) Open <Team Foundation Server>\Application Tier\Web Services\web.config file and append the following lines to the <configSections> section:
<!-- The following setting is for debugging Collaborator triggers -->
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
2) Also append the the following section to the web.config file:
<appender name="LogFileAppender" type="log4net.Appender.FileAppender">
<param name="File" value="C:/temp/collab_TFS_GatedCheckIn.log" />
<param name="AppendToFile" value="true" />
<param name="Header" value="[Header]\r\n" />
<param name="Footer" value="[Footer]\r\n" />
<param name="ConversionPattern" value="%d [%t] %-5p %c %m%n" />
<level value="DEBUG" />
<appender-ref ref="LogFileAppender" />
The above settings will generate the debugging log file at specified path.
3) Replace the DLLs in the Plugins folder with their fresh copy. This will force TFS to re-read the web.config file.
You may adjust the log output data for your needs by changing the above settings according to log4net convention of configuration files.