Auto-Links can be used to configure expressions to find texts in tickets that should automatically updated with a link. This can be useful if other tickets or external pages for should be referenced quickly within ticket texts in the Tickets application.
The expression is a regular expression to find the desired texts. As a special rule, the expression must contain at least one group (a pair of parentheses). This group (it must be the first group of the expression) marks the ID, which is a number or string which can then be linked to in the resulting link (e.g. a ticket-ID).
In the example "#([0-9]+([.,][0-9]{3})*)"
the digits, as well as if necessary thousand separators, are enclosed by the brackets, but the hash-sign is not. In the link, these digits are then used as {id_int}
in the URL.
See https://www.regular-expressions.info/quickstart.html for more information on how regular expressions work.
The Link in the configuration represents the URL. The following placeholders can be used:
{id}
: this is the ID marked in the expression, without any conversions. It can contain any character.{id_int}
: this is the ID marked in the expression, converted to an integer. Possible thousands separators are removed. Remember that ',' or '.' are always interpreted as thousands separators, not as decimal points. If no conversion is possible this placeholder will not be replaced.{serverurl}
: the base server URL of this server. Never ends with a slash. Does not need to be used when linking to external pages.Predefined linking:
#([0-9]+([.,][0-9]{3})*)
{serverurl}/ticketlist/ticket/{id_int}
{id}
).Additional example:
inv-([a-zA-Z0-9]+)
https://department.company.com/inventory/{id}/view
.*
" or ".+
". These expressions match arbitrary characters, as well as HTML control characters ("<,>,"
) and there is a risk of then suddenly matching the entire text."
, <
, >
, &
or other unicode characters, you must use the unicode notation in your expression. I.e. to find an &
followed by ä
, your expression might look like &ä(\d*)
.