Automatic Links

Applies to Collaborator 11.5, last modified on December 21, 2021

About

Collaborator creates links in comments and review fields. It parses the text of comments and fields and automatically creates links for —

  • URLs in the text you input.

  • Names of files in the review create links that open that file in the Diff Viewer.

  • Line numbers (for example, “line 345”) in a file comment create links to that line in the Diff Viewer.

In Collaborator, you can define custom link rules that Collaborator will apply to entered text. You do this using the Automatic Links settings.

Each automatic link includes a regular expression that Collaborator applies to the text that review participants enter in the review title, fields, comments, or defects. Collaborator uses this regular expression to extract the id of an item or document in the remote system and to form the link to that remote item or document. This way you can easily create links to external applications like issue trackers, automated build systems or documentation tools.

Automatic links

Click the image to enlarge it.

Collaborator parses the comments and fields right after you have changed them, as well as before displaying them on screen.

Requirements

  • Automatic links are supported in the Collaborator Enterprise edition.
    For a complete list of differences between Collaborator editions, see Collaborator Editions.

  • To configure automatic links, you need administrator permissions in Collaborator.

Create Automatic Link

  1. Log in to Collaborator as administrator (to create automatic links you need administrator permissions).

  2. Go to ADMIN > Review Templates > Automatic Links and click New Automatic Link:

    Create an automatic link

    Click the image to enlarge it.

  3. Specify parameters of the new automatic link and click Save to apply the changes.

  4. After you created an automated link, you need to make it available in a review template or templates you use. See below.

Edit Automatic Link

  1. Log in to Collaborator as administrator.

  2. Go to ADMIN > Review Templates > Automatic Links. Find the needed automatic link in the list and click Edit:

    Edit an automatic link

    Click the image to enlarge it.

  3. Edit the parameters of the automatic link and click Save to apply the changes.

If you have already added an automatic link to a template, you are done. There is no need to update the template. Else, enable the link in the template as it was described above.

If you want to disable an automatic link in some reviews, follow the instructions above.

Delete Automatic Link

  1. Log in to Collaborator as administrator.

  2. Go to ADMIN > Review Templates > Automatic Links.

  3. Find the needed automatic link in the list and click Delete:

    Delete an automatic link

    Click the image to enlarge it.

That’s all. There is no need to update review templates. Collaborator will apply your changes immediately.

Parameters of Automatic Links

Parameter Description
Title

The name that will identify the automatic link in the Collaborator UI.

Regular Expression

A Java-style regular expression that Collaborator will use to find links in the text entered by review participants.

To extract review identifiers, use grouping expression (in parenthesis, (...)). You can then use the group value in the “URL Format” or “Tooltip” parameters to construct the target URL.

For example, if you apply the regular expression ticket\s*(\w+-\d{1,5}) to a text like ticket AB-132, AB-132 will be extracted as the “group 1” value, and can be used later in the URL Format and Tooltip parameters (see below).

Case Sensitive

Specifies if Collaborator will differ upper-case and lower-case letters or not. Usually, this is set to "No".

URL Format

The destination URL. Can include references to groups captured in the regular expression. To specify a group, use the $groupNumber syntax. For example, http://my-bug-tracker.com/items/?id=$1.

Tooltip

(Optional) The tooltip that will appear when you hover the pointer over the link. If not set, Collaborator will use the URL text.

The tooltip can include references to groups set in the regular expression. To specify a group, use the $groupNumber syntax. For example, Go to case $1 in bug tracker.

See Also

Review Templates

Highlight search results