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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Automatically close issues only when the commit is merged into the default branch

Currently if I create bugfix branch, for instance, and make some commit containing "fixes #1" or "closes #1" in its message, it automatically close #1 issue.

However, I would like to happen only when the pull request associated to this branch is approved and merged into the default branch (develop or master).

I cannot understand how I must configure my repository to accomplish this.

2 answers

0 votes
Michael Wolfe Community Leader May 09, 2018

You can accomplish this by setting a workflow trigger for the status transition.

Hello @Michael Wolfe and thank you for your answer.

Maybe I should have added that I'm using Bitbucket Cloud and its issues tracker, not Jira.

Is it still possible to accomplish such thing?

Michael Wolfe Community Leader May 09, 2018

You might be able to do this with an automation plug-in, but I'm not familiar enough with a stand alone Bitbucker instance to know if this can or can't be done with additional software.  So far, the only thing I can find about closing issues is probably a document you are already familiar with:

You may want to see if ScriptRunner can automate this for you.

Well it's a llittlebit of a pity, this article describes it almost as I want it to work, except it totally forgets a very important factor, the branches and all the git branching model and flows around them.

I would love to have it integrated in Bitbucket Cloud like in Github (

Anyway, thank you again @Michael Wolfe for your answers.

Did you ever find an answer for this? I am also annoyed by this default behaviour but can't find any way to change it

Nop, never.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

2,589 views 1 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you