Automatic Links

Top  Previous  Next

Code Collaborator creates links in text that is typed by users as review comments, custom fields, etc... Several types of links are created automatically:

URLs create links to that URL
Names of files in the review create links that open that file in the diff viewer
Line numbers (e.g. 'line 345') in a file comment create links to that line in the diff viewer

You can define your own Automatic Links to integrate Code Collaborator with external systems. Each Automatic Link consists of a regular expression pattern, URL format, and optionally a tooltip. When a match is found, Code Collaborator creates a hyperlink around the matching text. The URL of the hyperlink and the tooltip are constructed by replacing references to groups with the text selected by the corresponding capturing groups in the regular expression.

Examples of external systems you might want to link to include issue/bug trackers, build tools, or documentation library systems.

Creating New Automatic Links

To create a new Automatic Link, click the New Automatic Link button.

admin-automatic-links-new

 

Creating a new Automatic Link

Creating a new Automatic Link

Title

Human-readable title for this automatic link, only used in the Automatic Link Configuration page.

Regular Expression

A Java-style regular expression that identifies a reference to the external tool in text.  This is used matched against user-entered text in review titles, custom fields, comments, and defects.

You must include at least one one grouping expression (parenthesis).  This is combined with the URL Format to link to construct the hyperlink to the external tool.

For example: case\s*(\d+)

This would match a string like Case 1423 but not 500 cases.  This is the standard way to refer to a bug in FogBugz.

Case Sensitive

Evaluate regular expression case-sensitively.  Usually this is set to "no".

URL Format

URL to link to, with references to groups captured in the regular expression above, in the form $groupNumber.

Example using FogBugz:

http://fogbugz.bugserver/?$1

Tooltip

Optional tooltip for link, with references to groups captured in the regular expression above, in the form $groupNumber.

Example:

Go to Case $1