Triggers

Top  Previous  Next

Code Collaborator can execute an external script or application when certain events occur.  This is useful when integrating Code Collaborator with other systems such as issue-tracking, ALM, or builds.

Possible uses of triggers include:

Mirror defects created in Code Collaborator into an external issue-tracking system.
Set a flag in a system when a review completes.
Intercept all notifications sent from Code Collaborator to log them or to send the notification in a way other than standard email or RSS.
Send notifications to a mailing list when certain events occur.

 

The Triggers section of the Administration page lets you configure the various triggers:

Review Created - Review created. No files or participants yet.
Review Phase Changed - Review phase changed, e.g. Planning -> Inspection or Inspection -> Cancelled.
Added Files - Files and/or changelists attached to a review.
Notifications Sent - A notification (email, RSS, etc.) was sent to someone.
Defect Activity - A defect was added, modified, or marked open/fixed. Use the defect unique ID to determine the difference.
User Created - A new user was created. This runs whether or not the creation was automated or manual.

admin-triggers

The Executable field specifies the application to run.  If this is a script, use the script executable here (e.g. Perl, PHP, Python).  This must be an absolute path to the application; the form will complain if the file cannot be found or executed.

The Parameters field is a list of arguments to supply to the executable.  If this is a script, the absolute path to the script itself is typically the first argument.

There are many special arguments you can supply that will be replaced by Code Collaborator when the application is executed.  For example, ${review.title} will be replaced by the title of the review associated with the given triggering event.  See the Variable Substitution chapter for details.