While Jira integrates nicely with a lot of tools, nothing beats its Bitbucket integration for combining your development and management workflows.
It’s no surprise Bitbucket and Jira get along so well: they’re both Atlassian tools. And they’re both mature products, focused on helping developers build complex software.
Here I’ll put together the definitive guide to integrating Bitbucket and Jira for the modern development team. I’ll show you how to get off the ground, and how to get the most out of your integrated platform.
One quick note before we begin: there are two types of Bitbucket installations. Bitbucket Server and Bitbucket Cloud. Both offer great repository hosting and and both integrate seamlessly with Jira.
Bitbucket Cloud takes everything out of your hands. Atlassian manages the details, and you only worry about your repositories. For folks who need a little more control, there’s Bitbucket Server. With Server, you manage the hosting and your code stays entirely on your servers.
Everything in this article applies equally to the Cloud and Server versions of Bitbucket, except for actually installing the integration. You should make sure to follow the instructions for your version of Bitbucket to get the integration up and running.
After that, you can treat both versions exactly the same!
Why Integrate Jira and Bitbucket in the first place?
First things first, why go to the trouble of integrating Jira and Bitbucket?
Actually, there are a lot of great reasons.
For starters, both tools have a lot of awesome features that can only be enabled if they’re integrated. As we’ll see later, integrating unlocks some great features on tools that you’re already paying for. If you’re spending the money, why not get the most out of it?
On top of that, another great reason is to allow your Jira to see what’s going on in the development process. Many teams use Jira as the final source of truth for project management. Adding a Bitbucket integration allows you to see the full picture.
Note: Read more about Jira in our Intuitive Jira Guide for Users.
Getting Started with the Jira Bitbucket integration.
Once you’ve decided to link your Jira and your Bitbucket, Atlassian makes it incredibly easy to actually get them connected. In fact, you can initiate the link from either Jira or Bitbucket.
The integration works through application links, which you can find in the admin section of your Bitbucket server. Jira is one of the predefined options, so from there you just follow the instructions and fill in your details. Bitbucket takes care of the rest!
After that, you should be able to see your Bitbucket details on Jira tickets.
Optimize Bitbucket for Jira’s Tooling
The base integration you’ve added will go a long way towards making your management easier.
But you can get even more out of the integration by making some quick changes to how you manage your Bitbucket development process.
To start, consider defining your branching strategy in Bitbucket. Branching strategies are a feature that let you set a naming convention and a merging strategy for new branches.
For example, in the feature branch workflow, you make new named branches for each new feature, and merge them into master after review.
Why is this important? Because with the integration, you can create and manage branches in Jira as easily as you can in Bitbucket.
Starting development on a new story in Jira? You can click to create a branch, and Bitbucket will follow your strategy selected above.
One other can’t-miss feature is Smart Commits. By including a few extra commands in your commit messages, you can now tell Jira to take actions whenever your commits land.
Want to mark a ticket closed with your latest commit? Just include the ticket id and the string #close in your commit, then push to Bitbucket.
Even better, you can even track your time in Jira using Bitbucket commits. Just include #time and the amount of time you spent, and it will get logged in the ticket.
Build Bitbucket into your Jira workflow
Of course, after you’ve done all that work on the Bitbucket side of things, there are some settings and practices you should tweak in Jira as well.
Many organizations are using Jira as a repository for information about the status of their projects. They use Jira to plan, track hours, and schedule future development.
This is great because Jira integrates with many other SaaS applications: billing software, customer support providers, and more. One way to think of the Bitbucket integration is as another pipeline of information, flowing into your Jira.
For example, one easy step to bring Bitbucket information into your Jira is to set up status triggers.
These allow you to change the status of tickets in Jira when events happen in your repository.
Pull Request just opened on a branch? Your ticket can automatically go from In Development to Code Review. This lets you see that latest status of development on all your projects.
Even without configuration, having the integration set up allows you to see the status of your repository without leaving a ticket.
If you’re using Smart Commits correctly, you should be able to see open pull requests, new commits, and release stages for everything linked to a ticket.
One more thing to try: Bitbucket has a powerful tool called hooks, that let you enforce rules on commits when they come into your repository. There are several hooks in the marketplace that let you require all commits to mention the related Jira issue or else they’ll be rejected. That way, you don’t have to rely on everyone remembering to include an issue key!
Note: Learn more about more about Jira Workflows in this blogpost.
Get To Know Hooks
Speaking of which, the hooks feature in Bitbucket Server is a great way to automate common actions related to managing code. If you’re building your code on a CI server, or running automated tests, hooks are a great way to manage that complexity.
In terms of integrating with Jira, there are a lot of great options out there! Check out the hooks menu to see what Bitbucket can do.
There are hooks for scanning your repository for “TODO” comments and creating issues from them, hooks for tracking technical debt, and hooks for helping out pull requests.
For BitBucket Cloud, there’s a similarly powerful feature in git-hooks. These scripts let you run code whenever developers make a change. You add the commits to your repository, new developers enable them, and the code is run whenever they commit.
Make the Most Out Of Pull Requests
One place the Jira Bitbucket integration really shines is in working with pull requests.
Bitbucket already has a great pull request interface, but Jira lets you take it to the next level.
This feature is under active development, so expect additional improvements over time.
When reviewing code, it’s common to suggest changes that need to be completed before merging.
Bitbucket lets you create a Jira ticket without leaving the pull request page, so you can continue your review uninterrupted.
For a given Jira ticket, there can be several users who are attached to the outcome. The original reporter, the ticket assignee, and the project lead for a given project.
Now that your tools are integrated, you should go through and ensure these are all aligned.
For example, you can set the default pull request reviewer in Bitbucket to be project owner in Jira to increase ownership of a project.
All this helps maintain Jira as an up-to-date dashboard of your project’s health.
When doing a code review in Bitbucket, you can compare the new code to the original ticket (and possibly even the customer bug reports that generated the ticket in the first place). Likewise, you can click through the pull request link in Jira to check the status and resolution of review tasks.
Try Out The Release Hub
One other great tool for projects with the Bitbucket integration enabled is the release management view, also called the Release Hub.
Release Hub lets you view visualize the status of your project and plan for an upcoming scheduled release. It provides a great burndown view to show you how much is left to do before your release date.
The Release Hub lets you see the status of all tickets for the release you’ve selected, along with their status in your Bitbucket repository.
You can see the outstanding issues, as well as a burndown chart showing estimated time left till release.
Views like the Release Hub show you the power of integrating your repository and your project manager.
In Jira, you get to see up-to-the-minute status on everything your developers are working on, and keep closer tabs on the projects you’re managing.
In Bitbucket, you no longer have to flip between tabs to see your issues, or to create follow up tickets for your reviews.
In both cases, the integration helps your tools get out of your way, and make the development process that much easier.
- Why Bitbucket is Better than Github.
- How to implement a Jira Migration (a step-by-step guide)
- How to set up the perfect Jira notification Scheme
- Jira Confluence Integration: The complete 2019 guide
- Key Updates of Atlassian Products 2019 (what you should know)
- Why Jira is better than Trello, even for non-developers
- 10 Expert Tips to 10x your Productivity in Jira