<< All Blog Posts
Trac-Slack Integration with Tracbot

Trac-Slack Integration with Tracbot

At Six Feet Up, we use Python to connect the various services we use internally. Many of these involve the open source wiki and issue tracking system Trac. We use Trac to document, organize, prioritize, assign and follow components of our projects.

Addressing Context Switching

To keep the teams up-to-date on a project’s status, we are regularly posting links to Trac tickets into Slack. The standard link itself provides very minimal information from a glance. You can just see the client name and a ticket number - that’s it. To get more information, you have to click the link, which isn’t always convenient if you are on a mobile device and not logged into Trac.

This was hampering our development process, as we were not able to quickly review a Trac ticket and solve the problem without having to leave Slack. Having to take additional steps to investigate a question or issue costs clients in both time and money. We knew this was an automation problem that we could tackle with minimal resources, and could even help other teams simplify their process.

Tracbot To the Rescue

To get information as quick and simply as possible in Slack, we’ve made a Slackbot called Tracbot.

tracbot_logo.png


Tracbot makes use of Slack’s slackclient and events-api within a lightweight Flask app. Tracbot listens for a link_shared event into Slack, which is configured to trigger on links from trac.sixfeetup.com. It’ll connect to the Trac instance via RPC to grab information from the ticket in the link, and posts the information as a reply in Slack:

tracbot_reply.png


This gives you a quick idea of the ticket in question, usually providing enough information that you don’t have to leave Slack.

Additionally, if you post a link pointing to a specific comment, Tracbot will show you that comment instead of the ticket’s summary:

fixed_tracbot.png

Try It Out

Tracbot has not been distributed as a Slack app, but code is available at: 

https://gist.github.com/cdw9/4fd66628b448273d294b3cafffee82b1

We encourage you to try it out in your Slack workspace and let us know how it is working. If you have any suggestions for improvement, contact us. This is the first of a series of posts on our Trac workflow. Stay up-to-date on our posts by subscribing here.

Additional Resources:

  • Try out Trac for your project management here.
  • Check out the full plugin list Trac supports here.
  • Learn how to create your own bot for Slack here.

Thanks for filling out the form! A Six Feet Up representative will be in contact with you soon.

Have a technical question? Ask a Sixie!