JetBrains Space Help

Link an Issue to a Commit or Code Review

Linking issues to relevant commits, code reviews, or merge requests lets you access all the data related to an issue in a single click. You can view commit messages in issues and access issues from code reviews, which helps you track the work progress without switching tabs.

When you create a link between an issue and a commit or code review, these entities become bound and synced:

  • The issues linked to a code review are accessible from the respective code review page, and those that are linked to a commit are accessible from the commit list, and vice versa.

  • The code review status displayed on the issue page will be updated automatically when it's changed.

  • When a linked commit is the last one in the branch, you can create a merge request right from the issue.

  • The status of an issue linked to a merge request can be updated automatically when the merge is successfully completed and the merge request is closed. (Available in Organization and Enterprise plans.) Also, you'll get a notification to the issue chat.

You can link issues to commits and code reviews in two ways:

  • By specifying a commit or code review on the issue page.

  • By mentioning an issue ID in the commit message or code review title.

  1. Open the issue click the Code changes tab.

  2. Click Link code changes:

  3. Depending on what you want to link, choose the Commits or Code Reviews tab.

  4. Select a commit or a code review from the list. To find the correct one you can:

    • filter commits by repository, author, branch, and date

    • filter code reviews and merge requests by state, repository, author, reviewer, branch, and date

  5. Click the Link... button.

When an issue is linked to a commit, you can see the issue details right from the commit list. Select the commit then hover over the issue ID to immediately see the issue title, status, assignee and due date, or click on it to see more details on the pop-up screen:


And on the issue page, you can see the linked commit under the Code changes tab:


Restrict linking issues to commits from specific branches

Commits that contain issue IDs in their commit messages are linked to referenced issues automatically. By default, Space monitors commits in all branches, but sometimes you may want to exclude references from specific branches to avoid clogging the issue history.

To choose which branches you want to monitor or ignore for references:

  1. Navigate to your repository.

  2. On the repository page, click Settings.

  3. On the repository setting page, go to the Issue Links tab.

  4. Specify the branch name pattern. Use - to exclude branches and + to include. When nothing specified, Space will monitor and include references from all branches.


Auto-update issue status when a linked merge request is successfully completed

You can have issues updated automatically to a predefined status upon a successful completion of a linked merge request.

To enable automatic status update:

  1. On the Issues page, click the Settings:

  2. On the issues Settings page, under the Statuses tab, select the checkbox Update issue status automatically when merging linked merge requests.

  3. Choose the target status:

  4. Click Save.

Last modified: 31 January 2023