How can we get all the issues associated to bitbucket commit

How can we get all the issues associated (through smart commit) to bitbucket commit 

1 answer

0 votes

Through the UI:

On the commit url (https://bitbucket-server-url/projects/project-name/repos/repo-name/commits/commit-hash) at the top right of the page, there is a section that will show the related issues, next to a JIRA icon. 



Sorry I didn't realise you were looking for an API.

The REST APIs available for Bitbucket JIRA integration can be found here:

Unfortunately, it does not contain a way to get the issues via a commit hash. In order to do that, you need to call getIssuesForCommit from the JiraIssueService. See for more details.

Hi Kristy,

Thank you for response. Is there any REST API available to pull out total issues associated to commit? I want to use this list in one of my developed plugin.

I have edited my answer to include details about the API. Hope that helps

Thank you very much. This is very helpful for me.

Hi Daiva and Kristy, Can you please share the code snippet or path where I can find it. Also can you please help me to find the correct jar file which will include JiraIssueService interface. Thanks

Hi @Rinkal Garg,

To access the API you need to write a Bitbucket Plugin (see for details).

You can depend on the jar by adding the dependency in your pom.xml


You would then need access to the JiraIssueService from your code (you'd probably wire this up using osgi) and you can call it with something along the lines of:

Set<JiraIssue> issues = jiraIssueService.getIssuesForCommits(ImmutableSet.of("111c0f1b97df94995b91f236300e4ae7f3ddf993", "dd25dda3131911ad842e0b828bff4825fae216e1"));


Hope that helps,


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 14, 2019 in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

280 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you