Use Teamwork with Bitbucket as an Issue Tracker

We use Teamwork on a daily basis to list our Tasks for the whole team to work on.  We also use Bitbucket to store our projects.

For the developers in the team, they can see the tasks and client communication in Teamwork but for clients and project managers, they can’t easily see the activity going on in Bitbucket. I wanted to improve this a little, to give clients and project managers more visibility on code changes , to be able to search for tasks in Teamwork that impacted a certain file name and also to improve our workflow a little too.

So what we’ve done is to make the Task ID’s that are already in Teamwork visible in each Tasks description. Then, if a developer is committing some code changes to make progress or finish that task, they can include specific keywords in their commit which will keep Teamwork updated. Its a system similar to Pivotal Tracker.

A Task with the Task ID

A Task with the Task ID

Here’s the work flow:

If I was working on a task in teamwork, its description would automatically show the following text (the number would change of course from task to task) :

Include [12345678] or [Finish 12345678] including brackets to update this task via commit

Then, as a developer, when I make a commit, I can include [12345678] in my commit message. As a result, a comment is added to the task in Teamwork, which show’s my message and lists any files that I have added/edited/deleted so far in my work on this particular task.

A task with file changes added

A task with file changes added

If I have finished the task, I can include [Finish 12345678] or [Finished 12345678] and my message and files changes will be added as a comment as usual but also the main task will have its title updated to include [Please Test] in the title text and it will also re-assign the task to the person that created it, so they know its ready to be tested.

An updated Task

An updated Task

Bitbucket is already set up to auto-deploy commits to a test site for a project (using deployHQ), so the client and project manager know they can now go to the test site and try out the completed work.

This keeps the client and project manager up to date on progress and finished work and also helps the developer to communicate well.  It adds their commit message to Teamwork, rather than having to commit their work and then also having to add a message to Teamwork separately.

The end result is a work flow thats a little easier for a developer, and more details in Teamwork for the project managers and its very clear what needs to be tested.

In the near future, if there is a bug in a file, it will also allow me to see any previous tasks that contributed to that file, who made those changes and who tested it, all in Teamwork.

How it works:

  1. When a task is added to a list in Teamwork, a COMMENT.CREATED ‘Hook’ is called to POST the details of that task to a particular PHP page on our server.  This PHP page gets the Task ID from those details and re-submits the task details back in to Teamwork with an updated Task Description which contains the text: “Include [12345678] or [Finish 12345678] including brackets to update this task via commit”
  2. In Bitbucket, a Hook is added to perform a similar job. When a Commit is added to a project, the commit details are sent to another PHP script one our server. The commit message is parsed to extract the Task ID and a comment is added to the particular task in Teamwork with the commit message details and files changed.

One of the handy things about Teamwork is that if a Hook is created, then it will work for any task list on any project, it just needs to be set up once.

However, with Bitbucket, the Hook needs to be added for each project, which is ok, but its just something that can be forgotten sometimes.


If you liked this post, here are other things we’ve done with Teamwork:


  1. Pingback: Create time sheet entries on Teamwork Projects from your code commits | Murrion Software

  2. Hi Simon,

    Thanks for reading and for commenting.

    I’m happy to share some short snippets if you are working with Bitbucket or Teamwork APIs and if you’re stuck on a particular part.

    What I’d like to do instead though is implement all of the above for you if you’re interested on your own servers.

    I have put this in place for several companies so far, to allow their tasks in Teamwork to automatically obtain a Task ID when created, to allow developer to commit messages to close or update those Tasks and for code commits to add time sheet entries to Teamwork automatically too.

    Its quick to implement if you’re interested?


Leave a Reply

Your email address will not be published. Required fields are marked *