• Documentation

Integrate Bitbucket with Jira

Connect Jira applications with your Bitbucket Cloud account for your team to enjoy the seamless integration of issues and code.

By connecting to Bitbucket, you can:

  • Surface repository activity – Jira issues automatically update to show repo branch, commit, pull request activity, and, if you have Bitbucket Pipelines enabled, your builds and deployments. For more information, see how to reference issues in your development work.

  • Get deep integration in Bitbucket – See the core details of Jira issues without having to change context, from anywhere in Bitbucket you see a Jira issue key, including commit messages, pull request comments, and deployment information.

  • Automate Jira workflows – Jira workflows sync with repo activity to update automatically as you work.

Read more about the benefits of integrating Jiraapplications with Bitbucket Cloud. If you're using a Jira Data Center application, see Linking a Bitbucket or GitHub repository with Jira.

Connect Jira with a Bitbucket Cloud account

Prerequisites:

  • To link Jira and Bitbucket Cloud you will need to have a Jira subscription and a Bitbucket account.

  • You’ll need to create a Bitbucket workspace so that you can link it to your Jira instance.

  • Log in to Jira as admin (Jira project admin permissions are not sufficient).

If you're connecting a software project:

  1. Navigate to your project and go to Project Settings > Features to enable code in your Jira project.

  2. Go to the code page and select “Connect to Bitbucket”, then choose the Bitbucket workspace you want to connect.

  3. Once you’ve connected Jira with Bitbucket Cloud, you can connect repositories to your project by including issue keys at the beginning of your branch names, commit messages, or pull requests.

You can also connect to a Bitbucket Cloud workspace by selecting Add shortcut from your project navigation and then selecting Repository. Once the repository link is created, choose Integrate Bitbucket to sync your Jira and Bitbucket accounts.

If you're connecting business projects:

  1. Choose> Products.

  2. Under INTEGRATIONS, select DVCS accounts.

  3. Select Link Bitbucket Cloud account.

If you're connecting service projects:

  1. Choose Settings > Projects.

  2. Select the project you want to connect with.

  3. Select Project Settings.

  4. Scroll down to Development tools.

  5. Click Connect and select Bitbucket Cloud.

Once the link is created, choose Integrate Bitbucket to sync your Jira and Bitbucket accounts.

Continue the connection process in Bitbucket

The connection process takes you to Bitbucket. Make sure you're logged in to the Bitbucket account that has the repos you want to connect with Jira, and then Grant access for Jira to your Bitbucket account.

Now, in Bitbucket, grant Bitbucket access to Jira.

You can enable Smart Commits for all existing repos in the account and for any repos added in future. (See Processing Jira issues with Smart Commits.) You can manage these settings later from the DVCS accounts settings page in Jira. See “Manage your linked account” below.

Once connected, you'll see your Bitbucket repos listed on the DVCS accounts settings page in Jira.

Approve an incomplete connection request in Jira

To complete a connection request in Jira, you must be logged in as a Jira admin. If you’ve started connecting Jira with Bitbucket Cloud and you’re unable to complete the process, you’ll need to ask a Jira admin to complete it for you. They can either:

  • go to the Code page and select Connect workspace to connect the relevant Bitbucket workspace; or

  • select Products from the Jira Settings menu, and select DVCS accounts under the Integrations heading. Then select Grant access to connect Bitbucket.

Manage your linked account settings

After you link a Bitbucket Cloud account with Jira, you can manage the connection and from the 'DVCS accounts' page in Jira.

If you're having problems with the connection, see Troubleshoot connections with Bitbucket Cloud.

Action

Instruction

Control Smart Commits

For the account: choose Default repository settings from the Actions menu.

Now modify the Smart Commits default setting as required:

The changed setting only applies to new repos added to the Bitbucket account.

For a repo: select, or clear, the Smart Commits checkbox in the row for the repo, as required.

Read more about processing Jira issues using Smart Commits.

Refresh the list of repos

To manually update the list of connected repositories, choose Refresh repositories from the Actions menu.

Manually sync repo activity with Jira

  1. To manually refresh your repositories in Jira, choose Jira Settings from the left navigation menu > Products from the JiraSettings menu > DVCS accounts under the Integrations heading.

  2. Click  in the upper-right corner of your repository list.

  3. Select Refresh repositories from the More options dropdown menu.

Disconnect the Bitbucket account

Choose Configure default repository settings from the Actions menu, then Disconnect.

 

Still need help?

The Atlassian Community is here for you.