You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Below API is available for Bitbucket Server and is not present in Bitbucket cloud.
GET /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/issues
Retrieves Jira issue keys that are associated with the commits in the specified pull request. The number of commits checked for issues is limited to a default of 100.
RequestPATH PARAMETERS
projectKey REQUIREDstring
The project key
pullRequestId REQUIREDstring
The pull request id
repositorySlug REQUIREDstring
The repository slug
We wanted the similar information about the Jira issues present in the raised pull request.
There isn't anything on this in the documentation, but let me know if it's already there or something related to it.
The only relatively practical solution i know of is to parse jira ID from PR name yourself.
I assume you are getting PR ID from bitbucket pipelines. So using this endpoint you can get PR title:
https://bitbucket.org/!api/2.0/repositories/{workspace_slug}/{repository_slug}/pullrequests/{pr_id}
Here is the regex pattern used for parsing issue IDs https://confluence.atlassian.com/bitbucketserverkb/integrating-with-custom-jira-issue-key-in-bitbucket-server-779171880.html
So when u parse issue ID from PR title you can just hit Jira API endpoint like this:
/rest/api/2/issue/{issue_id}
Hey Thanks for reply @Nemanja Trivic ,
yeah we have used similar kind of workaround for that.
as Bitbucket cloud API would have make more sense of us instead by creating such workaround.
so looking forward availability of desired API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arun,
I'm afraid that we don't have an API endpoint to get Jira issues associated with a PR. You can find those issues on the website only at the moment while viewing a certain PR, on the right-hand panel titled Details.
We have a feature request to provide such an API endpoint: https://jira.atlassian.com/browse/BCLOUD-20183
The request has been closed due to inactivity, but I would suggest leaving a comment there and adding your vote (by selecting the Vote for this issue link), as our product managers continue to monitor even closed requests.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are very welcome, please feel free to reach out if you ever need anything else.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Below API is available for Bitbucket Server and is not present in Bitbucket cloud.
Is there any update regarding its cloud api endpoint?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Theodora Boudale wanted a cloud api to find jira issues associated with a pr?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Arush Soel,
It is not possible to get Jira issues associated with a PR via API in Bitbucket Cloud.
Please add a comment to the following feature request to express your interest: https://jira.atlassian.com/browse/BCLOUD-20183
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.