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. 

 

Edit:

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

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

https://developer.atlassian.com/static/rest/bitbucket-server/latest/bitbucket-jira-rest.html

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 https://developer.atlassian.com/static/javadoc/bitbucket-server/latest/jira-api/reference/com/atlassian/bitbucket/integration/jira/JiraIssueService.html 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.

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

660 views 0 4
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot