Link to Bitbucket Issue Tracker from Commits
Platform Notice: Server only. This article only applies to Atlassian products on the Server platform.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Platform Notice: Server only. This article only applies to Atlassian products on the Server platform.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Purpose
This article should help users' commit text to link to their Bitbucket issues when they reference them in the form of "#1234"
Solution
If you want commit text to link to your Bitbucket issues when you reference them in the form of "#1234" for example, here's how you do it:
- Open your repository window
- Click 'Settings' in the toolbar
- Click 'Advanced'
- In the 'Commit Text Replacements' section, click 'Add'
- Select 'Other' for Replacement Type
- In the Regex Pattern field, enter "#(\d+)($|[^a-zA-Z0-9-])"
- In the Replace With field:
- On Mac, enter "<a href="https://bitbucket.org/your_username/your_project/issue/$1/">#$1</a>$2"
- On Windows, enter https://bitbucket.org/your_username/your_project/issue/$1
- Click OK twice
- Re-select the log item which has a mention of the #12345 style issue number, it should now be linked to the issue.