Integrate external ticket systems (Jira, etc.)

Hi,

there was a question on Twitter about “Auto-link references”. Basically a way to render a custom ticket string with an external URL and ticket system target.

Use Case

  • Integrate an existing ticket or issue management system into GitLab
  • Render a specific string like TICKET-1234 with a URL

This helps to avoid manually copying the ticket number and pasting it into the other tool’s search. Saves context switch and search cycles.

Technical Background

GitLab detects specific prefix characters and automatically renders them as URLs. This comes OOTB.

  • #123 for issues
  • !456 for merge requests
  • &789 for epics

This works in two stages:

  • First, you can use the live-search capabilities and search for a specific issue/mr/epic, by title or number
  • Second, the visible layer is rendered as short #123 while the backend actually stores the full URL in the background.

The mapping looks like this:

  • #123 - https://gitlab.com/groupname/projectname/-/issues/123
  • !456 - https://gitlab.com/groupname/projectname/-/merge_requests/456
  • &789 - https://gitlab.com/groups/groupname/-/epics/789

Customization

Whenever there is a specific string found in an issue description or comment, a regular expression matches and replaces that with a given user input.

In this specific use case, the user configures

  • a base URL to another ticket system like Jira, e.g. https://jiraserver.com/issue?query=
  • a prefix which detects this is a reference, e.g. JIRA-

The integration should then detect JIRA-1234 and renders this as <a href="https://jiraserver.com/issue?query=1234">JIRA-1234</a> in HTML in the client’s browser.

GitLab Integrations

GitLab supports generic and tool specific integrations: https://docs.gitlab.com/ee/integration/external-issue-tracker.html

Generic Custom Issue Tracker

Navigate into your project settings and select Integrations > Custom Issue Tracker.

image

Using the Custom Tracker integration allows to render issue URLs in a specific way. There are more and better ways to integrate existing tools like Jira.

Jira

Navigate into your project settings and select Integrations > Jira and follow the documentation for the configuration.

More Jira integration possibilites

Other Integrations

Feedback

  • Questions - reply, or create a new topic which references this one.
  • Missing feature or integration? Open a new issue please :slight_smile:

Cheers,
Michael

2 Likes