Someone asked me about integrating Ticket Poker with Jira.

I don’t use Jira, but it got me thinking.

I want to minimise the amount of work required to get everyone to estimate a ticket, and I want to enable people to integrate Ticket Pokerinto other planning tools. So I’ve added a very simple API to Ticket Poker. Here’s how it works;

To create a ticket, you call the API with the UUID of your team, and the URL of the ticket you want to estimate, as a JSON document

{
  "team_id": "uuid-of-your-team",
  "ticket_url": "url-of-the-ticket-to-estimate"
}

The response will be a JSON document with a single “url” key, which will be the URL of the ticket estimation page.

Share this with your team, as usual, to estimate the ticket.

{
  "url": "http://ticket-poker.herokuapp.com/share.this.with.your.team",
}

Any tickets you create will inherit the current set of coders and point values from your team.

Here is an example of a bash script to create a ticket from the command-line;

#!/bin/bash

TEAM_ID=[UUID from your team\'s URL]

TICKET_URL=$1

curl -s -H "Accept: application/json" \
     -H "Content-Type: application/json" \
	 	 -X POST \
     -d "{\"team_id\":\"${TEAM_ID}\",\"ticket_url\":\"${TICKET_URL}\"}" \
     https://ticket-poker.herokuapp.com/api/tickets \
     | sed 's/{"url":"\(.*\)"}/\1/'

(The sed part at the end is just a quick and dirty way to extract the URL from the JSON response)

Save this to a file called, for example, create-ticket.sh and make it executable (be careful that the quotes are not converted to smart quotes if you copy and paste).

Don’t forget to provide the correct UUID for your team, as TEAM_ID.

Then, you can create a new ticket like this;

./create-ticket.sh http://your-ticket-url.goes.here

If you use this to build any integrations with other planning tools, please let me know.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s