Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

make jira issue mandatory during commit or pull request

Hello Community, 

Need help please 

For better tracebiliy ,we want to make sure developers mentioned jira issue number dueing commit or pull request 

How can we achieve it in bitbucket cloud 

I am new to bitbucket , so please excuse if this is a simple question



1 answer

1 accepted

0 votes
Answer accepted

Hi @Ashish Saini,

There is a setting on the repository level to require an issue key in commit messages.

Can you please confirm if you are using Jira Cloud? If so, the first step is to double-check if the Bitbucket workspace that owns the repos you are working on, is already integrated with your Jira Cloud instance (and if not, integrate them).

  1.  Log in to
  2. Select your avatar > All workspaces
  3. Select the workspace that owns the repos your team is working on
  4. Select the option Settings from the sidebar (you'll need to be an admin of the workspace to see this option)
  5. Then select Jira from the new sidebar

If you see the Jira Cloud instance you use listed there, with the option Disconnect, it means the integration is already in place. Otherwise, you will see a link Connect. You can use that to make the integration (you'll also need to be an admin in Jira to perform this).

After you confirm that the integration is there:

  1. Open a repository of this workspace in your browser
  2. Select from the sidebar > Repository settings > Links
  3. You should be able to see some Read-only links for Jira. You will also see an option Require issue keys in commit messages. If you enable that, users will not be able to push any commits that don't have an issue key in their commit message.

We don't have a setting to require an issue key in PR titles and/or description. There is a feature request about this in our issue tracker that you can vote for if you'd be interested in that:

I'd like to mention here that if a PR is created without referencing an issue key, but the commits of the source branch have issue keys in their messages, then this PR will still be displayed in the respective issues in Jira.

Please feel free to let me know if you have any questions.

Kind regards,

Thanks @Theodora Boudale  for such a nice and details description 

I will try the steps mentioned and update you :)




Like Theodora Boudale likes this

You are welcome Ashish, I'll wait to hear your update then!

@Theodora Boudale : Hi Theodora .  i tried the solution and it worked 

However , it is also allowing invalid jira issues as well in the commit 

For example : I have AC-5 as a valid jira issue and it allows commit 

When i try with AC-55 , this issue is not available in jira itself ..still it allows the commit 

How can we avoid invalid issues during commit

Can you please advice



Hi Ashish,

Thank you for your reply.

The links in commit messages are created based on regular expressions. At the moment, I'm afraid that we don't do an issue validity check before creating a link.

We have a feature request about this in our issue tracker:

If you're interested in this, I would suggest that you add your vote in the feature request (by selecting the Vote for this issue link) as the number of votes helps the development team and product managers better understand the demand for new features. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the Start watching this issue link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy here and any updates will be posted in the feature request.

Please feel free to let me know if you have any questions.

Kind regards,

Thank you @Theodora Boudale  for the support and update 

It was really helpful 

Glad to be part of Atlassian Community 



You are very welcome Ashish, I'm more than glad to have helped.

Please don't hesitate to reach out if you ever need anything else!

Kind regards,

Suggest an answer

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

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,256 views 2 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