Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA-BITBUCKET

Abdullah Dursun
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 30, 2022

I have jira and bitbucket instance and I need to write a script to create bitbucket project and repository with the information from JIRA. I know python so have to do it with python:

1. Script should select issues of JIRA with project key in my case it is 'BR' and status To Do.
2. Script should read values of Bitbucket Project Name, Bitbucket Repository Name fields
3. Script should open a new Bitbucket project with Bitbucket Project Name if the project not exists
4. Script should open a new Bitbucket repository with Bitbucket Repository Name under project with Bitbucket Project Name
5. Script should update(create transition) JIRA issue. After the process JIRA issue should have status "Done"

Could someone help me about this. Thank you in advance!

3 answers

1 accepted

1 vote
Answer accepted
Aron Gombas _Midori_
Community Champion
March 30, 2022

The good news is that, I think, Python is the perfect tool to solve this.

You have to make calls to the Jira ad Bitbucket REST APIs. The REST API endpoints are very well documented and you can find Python examples, as well.

Hints:

For 1, just run a JQL query like this via the REST API: "project=BR and status=To Do".

Then iterate over the result, pick the values of the fields you mentioned, connect to Bitbucket, check the existence, create if not existing yet, and so on.

It is not very hard, good luck!

0 votes
Diana_Architect_ZigiWave
Atlassian Partner
July 8, 2022

@Abdullah Dursun hi there! I see two very good solutions pointed out in the comments above. I'd like to simply add an alternative way of connecting the two systems. You can use ZigiOps. It's an external no-code tool, that connects the systems instantly and allows you to transfer the information you need. You can also sync the data between them because it establishes a bi-directional connection. Feel free to look at it as a reference for future projects and even book a demo to see how it can help you. 

Regards, Diana (ZigiWave)

0 votes
Karthick S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 6, 2022

Hello @Abdullah Dursun

Welcome to the community!

You can check various REST APIs for Bitbucket Cloud here which you may use for the custom scripting. 

I hope this helps.

Kind regards,

Karthick S

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events