Set up the Issues service

With this service, you can set up Bitbucket Cloud to change the state of a given issue, based on the commit message in an update. The Issues service scans commit messages for keywords.  You can use these keywords to automatically change the state of an issue on your repository's issue tracker.

If you enabled an issue tracker on your repository after August 2012, the Issue service is enabled automatically for you.  Older repositories with older issue trackers may or may not have this service enabled.  You can check if this service is enabled by going to the Services tab on your repository settings:

If you are having trouble with the service, see Troubleshooting Bitbucket services.

Enabling the service manually

  1. Log into Bitbucket and navigate to the repository you want to modify.
  2. Click the settings icon .
  3. Click Services on the left-hand side of the screen.
  4. Select the Issues service from the Select a service list.
  5. Click Add service. That's it – done.

Putting the Issue Keywords into your Commit Message

To link commit to an issue from a commit message, include an command-issue pair somewhere in your commit message. This pair takes the following format:

<command> <issue id>

You can link to a single issue or multiple issues.  The <issue id> can take an of the following forms:

issue #4711
bug #4711
ticket #4711

You should always include the # (pound sign or hash mark) if you to ensure that links back to the issue resolve.  If you omit the # (pound sign or hash mark), links from a changeset do not resolve.

Each action supports multiple <command> keywords. The following table lists the actions you can perform through a commit and the acceptable commands for that action.  All the keywords are case insensitive. So, for example, both close and Close work to close an issue.

Action Command Keyword Examples
resolve an issue
  • close
  • closes
  • closed
  • closing
  • fix
  • fixed
  • fixes
  • fixing
  • resolve
  • resolves
  • resolved
  • resolving

close #845

fix bug #89

fixes issue 746

resolving #3117
reopen an issue
  • reopen
  • reopens
  • reopening
reopen #746

reopening #78

mark an issue on hold
  • hold
  • holds
  • holding
holds #123
mark an issue wontfix
  • wontfix
wontfix #12
mark an issue invalid
  • invalidate
  • invalidates
  • invalidated
  • invalidating
invalidates #45
link to a changeset for the issue
  • addresses
  • re
  • references
  • ref
  • refs
  • see
re bug #55

see #34 and #456

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport