Reference commits into issues as comments

Issue #7416 resolved
Anselm Hannemann
created an issue

When committing code (via git in my case) one should be able to reference an issue via its hash ID. This also affects closing of issues which already works but gives no notice which commit closed it.

Every mention of an issue via commit notice should be reflected as comment in the issue itself so one can easily jump to the commit when viewing an issue.

Comments (21)

  1. Michael Frauenholtz staff

    Hi Anselm,

    This should currently work, and create a comment on the issue with a link to the commit, like this:


    Please see the documentation for setting up the Bitbucket issue service, and let us know if this isn't working for you.


  2. Anselm Hannemann reporter

    Do I have to set something to use it? Have tried this several times but it never worked for me… :/ It also does not close my issue. I just added 'Fixes #[issueid]' to my git commit message which should work normally.

  3. Michael Frauenholtz staff

    Hi Anselm,

    For your repository, is the Issues Service turned on? That should be all you need to close or reference issues (see all the commands in the documentation above), as well as add an issue comment linking to the commit. Also, after you push to Bitbucket, does your commit message on the site link to the issue number?

  4. Anselm Hannemann reporter

    Hi, it is turned on. After push in the commit message the link appears although in the issue itself there happens nothing (no action to set to resolved nor a comment to the commit).

  5. Brian Nguyen

    Hi Anselm,

    I believe that the issue with our services has now been fixed. I'm closing this issue, but if you are still having problems setting up the service please reopen this.

    Cheers, Brian

  6. ricardolarrahondo

    Hi, i have same problem, when i reference an issue by commit mesagge, i dont get a comment in the issue referencing to that commit. althought in the commit the issue is referenced.

  7. tibor strausz

    i have the same problem as victor ng KP has:

    "When committing, I put "issue #43" but the issue is not linked to the comment of that issue. Only "resolved #43" closes the issue and linked to it."

    i tried #43 and issue #43 both are not working. when i do resolved #43 it is working.

    i see the commits in the commit list.

  8. tibor strausz

    on your example i found at the bottom of the page that you can add a commit message with these keywords without changing the status:


    is there a way to add a command? i like to use

    working on: #123

  9. Log in to comment