We’ve been using Ticket Poker for a while, in my current team, and we’re pretty happy with it.
Now, after each planning session, I take the stories we create in Pivotal Tracker, use a command-line script to generate a Ticket Poker ticket for each one, then paste its URL back into the Pivotal story.
That gets a bit repetitive, so I decided to write a script to do the work for me.
The process goes like this;
- Find all of the development stories in the Pivotal Tracker project which haven’t been estimated yet
- For each of those stories, check if it already has a Ticket Poker ticket
- If it doesn’t;
- Create a new Ticket Poker ticket via the API
- Add the URL of the new ticket to the Pivotal Tracker story
In ruby, that could look something like this (assuming project
is a class representing a Pivotal Tracker project,
and ticket_poker
is a class that exposes the Ticket Poker API);
The Pivotal Tracker API is really easy to use. Fetching the stories just requires GETting the stories endpoint of their latest, stable REST API.
https://www.pivotaltracker.com/services/v5/projects/$PROJECT_ID/stories
To filter for unestimated development stories, we just need to add a filter string as a querystring parameter;
label:"development" estimate:-1
We URL-encode that, and append it to the API URL as;
?filter=[encoded filter string]
To check if the story already has a Ticket Poker estimation ticket, check all the tasks belonging to the story, and see if any of them have “Ticket Poker” in their descriptions.
We can get all the tasks belonging to the story by GETting the story tasks endpoint;
https://www.pivotaltracker.com/services/v5/projects/$PROJECT_ID/stories/$STORY_ID/tasks
To add a ticket estimation task to the story, we first use the Ticket Poker API to create the ticket, then POST to the Pivotal Tracker story tasks endpoint to create the new task.
Here, ticket_poker
is an object that exposes the Ticket Poker API, and @project
is a reference to a class representing
our Pivotal Tracker project.
You can see the full script on the Ticket Poker API page (click on ‘Pivotal Tracker’ in the list of API Integration Examples).
It should be quite straightforward to follow this same pattern to integrate with any other planning tools, provided they have a suitable API. If you create any more integrations, please let me know and I’ll add them to the documentation.