How to mark an issue as resolved from the commit log?

Jader Dias picture Jader Dias · Jan 5, 2010 · Viewed 12.4k times · Source

I noted that in BitBucket when your commit log contains a number like #12 this number is linked to the bug number 12.

I found this feature interesting, and I wonder if there is any keyword that would allow me to mark the issue as resolved from the commit log instead of going to the web interface each time.

If BitBucket doesn't do it, could you point a system that does?

Answer

Rob Van Dam picture Rob Van Dam · Jan 16, 2010

Bitbucket already supports marking issues on commit using the Issues service.

The issues service scans commit messages for commands which will automatically change the state of the relevant issue on the tracker.

[snip]

Examples:

"... fixes #4711 ..." # marks issue as resolved
"... reopening bug 4711..." # marks issue as open
"... refs ticket 4711..." # links changeset to issue as comment
"... refs bug #4711 and #4712..." # links to multiple issues

You may need to activate it, to do so:

Services can be activated on a per-repository basis by the administrator. Go to your repository page, select the Admin tab, click Services, then select a service from the list, and add it.