Linking Commits to Issues

Just a quick post to let you know that we recently added support for linking issues to commits in CodePlex using the same #1234 syntax being used in TFS 2013.

Screenshot of SvnBridge project showing a work item link using the #1234 syntax

Basically, if you insert a ‘#’ symbol followed by an integer in your commit statement, changeset comment or pull request comments then this will render as a link to the work item when displayed in the browser. We’ll be expanding on the work item grammar so I’m interested in what you think – I notice that the NuGet team quite often mention “Work Item: 1234” or “Issue 1234” when talking to work items so looks like we should probably expand the detection to use that pattern. If there are other ways that you find yourselves working already then let me know in the comments.

Comments (8)

  1. Good idea says:

    Good idea

  2. Heath says:

    Thank you. I've been using this syntax (being a contributor on a few GitHub repos) for a while and I see you automatically linked old commit messages.

    What would be even better is if the work item was updated with link(s) to any commit(s) that reference it. This way, the bug opener (or other interested parties) can see which commits to pull down or otherwise take a look at.

    Keep up the good work!

  3. bricelam says:

    Specifying "Work Item: 1234" automatically resolves and adds a comment to work items when the commit is pushed.

    See…/work-item-keyboard-shortcuts-resolving-mercurial-work-items-wikiplex-2-0.aspx and

  4. Martin Costello says:

    With the on-premises product, I usually use "…Bug 1234…"

  5. Robert says:

    Nice update, I wonder why you don't tweet about it?

  6. What about the other way around? says:

    Highlighting Links –

    Literally 10 minutes before I saw this post I did a commit where I included the entire link to the issue (E.g.…/3). I was surprised that wasn't automatically highlighted in the commit list as a link (e.g.…/changesets).

    Reverse Links –

    What about automatic links from issues to commits? In fact the way I found this post is that I was closing an issue because the commit resolved it and I couldn't figure out how to automatically link the two and it seemed silly to include the commit link (e.g.…/ce0172477affc6a3bb74edbdbc409fc7b98293df) in the issue manually. So what about automatic backward linking? If a commit links to an issue then shouldn't the issue automatically show a link back to the commit?

    In any case this is a useful feature, thanks!

  7. Mark Heath says:

    I've been using "issue 1234" so it would be great if that pattern could be detected

  8. Steve Dower - MSFT says:

    We typically use the number at the start of a line, followed by the issue description. Easy enough to change to adding the # at the start, but it would be nice for our history if lines starting with a number could be detected.

    +1 for links being added from the issue back to the commit. One of our team does a lot of this manually, so he'll probably +100…

Skip to main content