Forums

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

JIRA Issue creation when commit/push happened to Bitbucket

Anil Kumar Patcha February 12, 2019

Hi,

We would like create a JIRA issue automatically when a change is pushed to Bitbucket branch. Is there a way that we can accomplish this without using any additional add-ons? If yes, could you please guide me on how to do that? 

3 answers

0 votes
Kumaresan_Subramani February 1, 2020

HI All,

 

Can we able to add comment to jira task through gulp task, if yes can anyone share some example or documentation

0 votes
Mikael Sandberg
Community Champion
February 12, 2019

If you are looking to create issues in Jira when something is committed on a branch you need to setup a post commit hook, either locally at each client or in Bitbucket using an app (External hooks for example which is free) that runs a script that creates the issue via REST API.

Anil Kumar Patcha February 14, 2019

Hi Mikael,

Looks like External hooks is paid add-on now. Could you please share any other method for this?

Mikael Sandberg
Community Champion
February 14, 2019

You are correct, we have the free version still installed and I did not check the marketplace listing. 

The only free option would be to use Web Post Hooks for Bitbucket and have Jenkins run your script to create the issue or create your own web server for the script that can be called from the app.

The only option I can think of that does not involve any apps would be to have the post hook on push that is distributed to each client. You can add the hook to your repository and share it with your developers, this blog post describes two ways to share hooks.

0 votes
Gabriele Franck
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 12, 2019

Hi, Anil

The linking between JIRA and Bitbucket does not copy Bitbucket issues over to JIRA, or vice-versa. 
The intention is that you use either JIRA or the Bitbucket as issue tracker.

In case you're using JIRA as issue tracker, the DSS Connector makes it so that whenever you mention a JIRA issue in a commit message, comments, etc, Bitbucket will make it a link to an issue in your JIRA instance. You do can configure an automatic trigger in Jira from that, but you still need an existing issue in Jira already.

If you decide to use Jira as issue tracker you may want to export your existing issues from Bitbucket to a CSV file and them do an import in Jira, but note that this sync is done manually and Jira won't do an "automatic" sync each time you create an issue in Bitbucket. This is why I mentioned you use either JIRA or the Github as issue tracker.
This doc can help you in the process: Importing data from CSV

 

Let me know if this clarifies your questions!

Gabi

Anil Kumar Patcha February 14, 2019

Hi Gabi,

I am not looking to copy Bitbucket issues to JIRA. My requirement is, whenever change is pushed to Bitbucket, it should create an Issue automatically in JIRA.

Florian Reichl
Contributor
May 30, 2023

anyone found a smart solution on that topic so far?

Suggest an answer

Log in or Sign up to answer