somebox / jira-tracker-for-trello

A way to keep Trello boards updated with JIRA ticket information (comments, details, attachments)
56 stars 3 forks source link

Jira Tracker for Trello

NOTE: As of 2016-12-10, this project is still installable, and should be usable. However, I am not actively using it. I may not be able to respond to issues and bugs, but I am happy to review and merge pull requests. And if you would like to take over as a maintainer, just file an issue and let me know! -Jeremy

Trello/Jira Integration

This project exists to improve workflow between Trello and Jira. It is perfect for an agile team that uses Trello for daily development and sprint planning, but must interact with JIRA for other teams or bug reports. From experience, I have learned it is very hard to track issues in both systems at the same time, and this solution helps.

A script is run periodically from cron. It interacts with JIRA and Trello using the web APIs. The "bot" is a Trello/Jira user that should have it's own individual account on both systems (we call ours "jirabot").

Features

Keeps Trello cards up-to-date with referenced JIRA tickets:

There is also an import command, handy for creating new Trello cards from JIRA tickets.

How it works

The intregration works by assigning the bot to Trello cards and mentioned it in comments. For instance, adding the comment @jirabot track AX-123 to a Trello card will enable automatic updates from JIRA issue AX-123.

A script runs periodically, and checks relevant Trello tickets for tracking commands and status. Changes to tracked JIRA tickets (new comments, attachments or ticket resolutions) are posted to the Trello cards as comments.

Screenshot

trello test board

Installation

Authentication Config Notes

How to get the authorization info needed in config/config.yml:

JIRA

Provide a username and password for a "bot" account in JIRA. At the moment this project does one-way sync, so the account can be read-only. This will use the REST API over HTTPS.

Trello

Create a 'bot' user on Trello, and add it to one or more boards. Trello requires OAuth, using 2-step authentication. Log in as the bot user and generate three pieces of info:

Usage

A Trello card can be set up to track a set of JIRA tickets. The bot should have access to the board, and be assigned to the ticket. Commands are issued by adding comments to a trello card and mentioning the bot by name:

@jirabot track SYS-1234

The bot will respond to with a comment on the ticket:

SYS-1234 is now being tracked.

Once tracked, updates to the JIRA ticket will be posted to the Trello card as comments.

Here are available commands:

Design

The ruby-trello gem is used to communicate with Trello. The rest-client gem and some basic models are used for JIRA.

ActiveSupport is used to handle configuration, and gain access to things like .present?.

There is no data or state infomation persisted locally. Sync status is determined by looking at event timestamps, and comparing them to when the bot last posted a comment.

TODO

Add more commands:

Maybe the untrack command is unneccessary. Removing the command comment, or the bot from the card has the same effect.

Inspirations