TeamCity 4.0 Help

Mapping External Links in Comments

TeamCity allows to map patterns in VCS change comments to arbitrary HTML pieces using regular expression search and replace patterns. One of the most common usages is to map an issue ID mentioning into a hyperlink to the issue page in the issue tracking system.

To configure mapping:

  1. Navigate to the file TeamCity data directory /config/main-config.xml

  2. Locate section < comment-transformation >, or create one under the <server> tag, if it doesn't exist (you may refer to the main-config.dtd file for the XML structure definition)

  3. Specify the search and replace patterns. For example, you can use the following pattern for enabling JIRA integration:

<server> ... <comment-transformation> <transformation-pattern search="(>|\(|\s|^)([A-Z]+-\d+)(\b|$)" replace="$1<a target="_blank" title="Click to open this issue a new window" href=" http://www.jetbrains.net/jira/browse/$2">$2</a>$3" description="JetBrains Jira issue link" /> </comment-transformation> ... </server>
Last modified: 20 April 2023