66

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?

Giovanni Cappellotto
  • 4,597
  • 1
  • 30
  • 33
Jader Dias
  • 88,211
  • 155
  • 421
  • 625

4 Answers4

102

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.

Community
  • 1
  • 1
Rob Van Dam
  • 7,812
  • 3
  • 31
  • 34
  • excelent! It seems I forgot to RTFM before posting here. But it is nice also to see what other technologies provide – Jader Dias Jan 16 '10 at 13:23
  • More info on supported formats on the commit message here: https://confluence.atlassian.com/display/BITBUCKET/Setting+Up+the+Bitbucket+Issues+Service – André Morujão Jul 19 '12 at 13:55
  • 2
    Seem like the page now lives here instead: https://confluence.atlassian.com/display/BITBUCKET/Setting+Up+the+Issues+Service – SilverSnake Oct 12 '12 at 14:09
  • And now here: https://confluence.atlassian.com/display/BITBUCKET/Set+up+the+Issues+hook – Ryne Everett Nov 30 '14 at 17:11
  • If you enabled an issue tracker on your repository after August 2012, the Issue hook is enabled automatically for you. – Thunder Rabbit Apr 29 '15 at 14:03
8

Redmine has configurable options. Most used ones are:

  • Refs #XXX / See #XXX -- references an issue
  • Closes #XXX / Fixes #XXX -- marks issue as resolved/closed
Eimantas
  • 48,927
  • 17
  • 132
  • 168
3

Trac does it as well, of course. It's easily configurable:

   _supported_cmds = {
                       'closed':     '_cmdClose',
                       'fix':        '_cmdClose',
                       'addresses':  '_cmdRefs',
                       're':         '_cmdRefs',
aaimnr
  • 1,646
  • 1
  • 17
  • 31
2

Google Code Project Hosting also supports it:

http://code.google.com/p/support/wiki/IssueTracker#Integration_with_version_control

There are commit-log commands to:

  1. Easily set an issue's status to Fixed.
  2. Update any aspect of the issue, and add a comment.
  3. Enter a new issue.
  4. Request a code review.

    (Fixes issue NNN)    Enclose command in parentheses
    Fixes issue NNN.     Full sentence in your log message description
    Fixes issue NNN  On a line by itself
    

The word Fixes can replaced with Closes or Resolves. The issue number can have a leading pound-sign (#) or not.

The other commit-log commands use a multi-line "long form" syntax that is more powerful.

COMMAND-LINE
ISSUE-FIELD-UPDATE*
COMMENT-TEXT...

Where COMMAND-LINE is one of the following:

Update issue NNN
New issue
New review

There can be any number of ISSUE-FIELD-UPDATE lines. These lines can be one of the following:

Summary: NEW-VALUE
Status: NEW-VALUE
Owner: NEW-VALUE
Cc: PLUS-MINUS-LIST
Labels: PLUS-MINUS-LIST
Jader Dias
  • 88,211
  • 155
  • 421
  • 625