Blog

5 Reasons to Link Code Commits to Tickets

Andy Singleton on January 12, 2016

One of the most useful (and oldest) features in Assembla is the link from code commits to tickets. 

To link a code commit to ticket 30886, you just put "#30886" somewhere in the commit comments. Then, when you go to the ticket, you will see the a new comment with a link to the code commit.  On code commit, you will see a link to the ticket.

This is an example of the commit view. As you can see the commit message includes the reference to the ticket #30886. This, links to the ticket view.

commit4.png

The image below shows the ticket comment view of the commit. This is automatically created when you reference a ticket in your commit message or Merge Request.

commit5.png

I'm bringing this up because we find that a lot of our repository users don't use this great feature, and some don't even try the tickets tool.

Here are five reasons that you should try it:

  1. PEOPLE: Bridge the gap between coders and other people on the project.  People really want to know what you are doing.  Now they can see it in the ticket comments.

  2. INFORMATION: Get the information that you need.  You can't write useful code and build good web pages without a clear explanation of the use cases, and feedback.  Use the ticket to get this information.

  3. HISTORY: Show a complete history of a change, not just a commit.  The ticket keeps a list of all of the code changes you made to satisfy one request. Working incrementally is great - as long as you stay focused on the end goal.

  4. SAVE TIME:  You can code and communicate at the same time. You can close a ticket with "closes #99" or "fixes #99".  You can set any status with "<status> #99" to set ticket #99 to the target status. For example, "Test #99" or "Fixed #99".

  5. COLLABORATE: You get to use Assembla Tickets. It's a great collaboration tool.  The cardwall is an easy way to keep the team on track. My favorite feature is mentions, which gets a conversation going.  Write @user in a comment, and the system will alert that user.  You can also write @user! and they will get an email bringing them in to respond to your comment.  In our new release, you can even start a chat on the ticket, becuase as you write comments, everyone gets an update in real time.

How to get started

To link your code commits to tickets, all you have to do is start notating your commits with the ticket number, as described above. The feature is already active in all Assembla Workspaces and Portfolio plans.

Have questions? Tales of success with linking commits to tickets? Suggestions for future improvements? Let us know in the comments below.