Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to get JIRA ticket url from Bitbucket Pull Request

I'm writing a plugin and wanted to pull all Jira ticket along with their url (multiple Jira instance are linked to my bitbucket data center). and export it

Currently I'm calling pull request api is which is returning internal url which can be resolved from browser but I'm looking for exact url or way to get Jira ticket url out of it.

 

https:/bitbucket-host/bitbucket/rest/jira/latest/projects/JIR/repos/icgjira/pull-requests/30/issues
This just returning 
[
    {
        "key""BOP-967",
    },
    {
        "key""C1311-9",
    }
]
here both url belong to different Jira instance and I don't see any way to get Jira url for issue.
Please help.
Thanks,
Anil

1 answer

I see some workaround by calling below bitbucket rest api

/rest/jira-integration/latest/issues?issueKey=C1311-9&fields=url

"url":"https:\/\jira.atlassian.com/\/jira\/browse\/C1311-9"

Read url value from the response json, it will give Jira URL for provided ticket.

 

If anyone have more simpler solution or using Java API, kindly suggest.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events