Article Image
Article Image
read

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 Poker into 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.

Blog Logo

David Salgado


Published

Image

Ronin on Rails

Give a man a fish and he’ll eat for a day.
Give a fish a man and he’ll eat for weeks.

Back to Overview