Dave Perrett

Importing a Pivotal Tracker Project Into Trello

api, programming, ruby

I’m currently in the middle of migrating a project from Pivotal Tracker to Trello, and couldn’t find any easy method of importing the data, so I spent this morning putting together a gem to do exactly that.

Introducing the pivotal-to-trello gem

pivotal-to-trello provides a command for exporting a Pivotal Tracker project to a Trello board.

Getting started

  1. Install the gem:

     > gem install pivotal-to-trello
    
  2. Run the importer (replacing TRELLO_API_KEY, TRELLO_TOKEN, and PIVOTAL_TOKEN with your own credentials) :

     > pivotal-to-trello import --trello-key TRELLO_API_KEY --trello-token TRELLO_TOKEN --pivotal-token PIVOTAL_TOKEN
    

See the Obtaining API credentials section below for details on how to obtain these credentials.

The importer will ask you a series of questions to identify which Trello lists you want to import certain classes of stories into. It will then import the stories into Trello, along with any associated comments. It does not currently have the ability to import attachments.

For example :

    > pivotal-to-trello import --trello-key TRELLO_API_KEY --trello-token TRELLO_TOKEN --pivotal-token PIVOTAL_TOKEN

    Which Pivotal project would you like to export?
    1. Android App
    2. IOS App
    3. Tech Support
    4. Web App
    Please select an option : 4

    Which Trello board would you like to import into?
    1. Development
    2. Welcome Board
    3. Wish List
    Please select an option : 1

    Which Trello list would you like to put 'icebox' stories into?
    1. Accepted
    2. Backlog
    3. Bugs
    4. Delivered
    5. Finished
    6. Icebox
    7. In Progress
    8. Rejected
    9. Releases
    10. [don't import these stories]
    Please select an option : 6

    Which Trello list would you like to put 'current' stories into?
    1. Accepted
    2. Backlog
    3. Bugs
    4. Delivered
    5. Finished
    6. Icebox
    7. In Progress
    8. Rejected
    9. Releases
    10. [don't import these stories]
    Please select an option : 7

    Which Trello list would you like to put 'finished' stories into?
    1. Accepted
    2. Backlog
    3. Bugs
    4. Delivered
    5. Finished
    6. Icebox
    7. In Progress
    8. Rejected
    9. Releases
    10. [don't import these stories]
    Please select an option : 5

    Which Trello list would you like to put 'delivered' stories into?
    1. Accepted
    2. Backlog
    3. Bugs
    4. Delivered
    5. Finished
    6. Icebox
    7. In Progress
    8. Rejected
    9. Releases
    10. [don't import these stories]
    Please select an option : 4

    Which Trello list would you like to put 'accepted' stories into?
    1. Accepted
    2. Backlog
    3. Bugs
    4. Delivered
    5. Finished
    6. Icebox
    7. In Progress
    8. Rejected
    9. Releases
    10. [don't import these stories]
    Please select an option : 10

    Which Trello list would you like to put 'rejected' stories into?
    1. Accepted
    2. Backlog
    3. Bugs
    4. Delivered
    5. Finished
    6. Icebox
    7. In Progress
    8. Rejected
    9. Releases
    10. [don't import these stories]
    Please select an option : 10

    Which Trello list would you like to put 'backlog' bugs into?
    1. Accepted
    2. Backlog
    3. Bugs
    4. Delivered
    5. Finished
    6. Icebox
    7. In Progress
    8. Rejected
    9. Releases
    10. [don't import these stories]
    Please select an option : 2

    Which Trello list would you like to put 'backlog' chores into?
    1. Accepted
    2. Backlog
    3. Bugs
    4. Delivered
    5. Finished
    6. Icebox
    7. In Progress
    8. Rejected
    9. Releases
    10. [don't import these stories]
    Please select an option : 2

    Which Trello list would you like to put 'backlog' features into?
    1. Accepted
    2. Backlog
    3. Bugs
    4. Delivered
    5. Finished
    6. Icebox
    7. In Progress
    8. Rejected
    9. Releases
    10. [don't import these stories]
    Please select an option : 2

    Which Trello list would you like to put 'backlog' releases into?
    1. Accepted
    2. Backlog
    3. Bugs
    4. Delivered
    5. Finished
    6. Icebox
    7. In Progress
    8. Rejected
    9. Releases
    10. [don't import these stories]
    Please select an option : 2

    What color would you like to label bugs with?
    1. Blue
    2. Green
    3. Orange
    4. Purple
    5. Red
    6. Yellow
    7. [none]
    Please select an option : 5

    What color would you like to label features with?
    1. Blue
    2. Green
    3. Orange
    4. Purple
    5. Red
    6. Yellow
    7. [none]
    Please select an option : 2

    What color would you like to label chores with?
    1. Blue
    2. Green
    3. Orange
    4. Purple
    5. Red
    6. Yellow
    7. [none]
    Please select an option : 6

    What color would you like to label releases with?
    1. Blue
    2. Green
    3. Orange
    4. Purple
    5. Red
    6. Yellow
    7. [none]
    Please select an option : 4

    Beginning import...
    Creating a card for chore 'My example chore'.
    ...

Obtaining API credentials

You can get your Trello application key by logging into Trello, and then visiting https://trello.com/1/appKey/generate

Your 32-character application key will be listed in the first box.

To obtain your Trello member token, visit the following URL, substuting your Trello application key for APP_KEY:

https://trello.com/1/authorize?key=APP_KEY&name=Pivotal%20To%20Trello&response_type=token&scope=read,write

Click the Allow button, and you will be presented with a 64-character token.

See the Trello documentation for more details.

The Pivotal Tracker token can be found at the bottom of your Pivotal profile page.