Working for a client that uses Basecamp, I was looking for a way to integrate with Basecamp, more specifically Basecamp 2 with phpStorm. However phpStorm doesn’t out of the box support it. After scouring the internet and looking at syncing services, I didn’t find an option I liked. However I did find some hope in using a generic server inside phpStorm. It took a bit of trial and error to make it work. But I wanted to share how to do it for anyone else. For this example, I’m going to show how to set this up to pull tasks assigned to a certain person, for all projects

Follow these following steps.

  1. Obtain Basecamp Account ID.
    1. This can be done by logging into Basecamp
    2. You should arrive at a page with a URL like this: https://basecamp.com/1234567/
    3. Your Basecamp account ID is then 1234567.
  2. Obtain Basecamp User ID
    1. The above your add /api/v1/people.json, your resulting url should be something like https://basecamp.com/1234567/api/v1/people.json
    2. This will require you to login, user the same login as in #1
    3. If done correctly this should give a JSON with all the users in the account. The first entry in the JSON array should be an id. Let say it’s 9876543210.
  3. Verify your Basecamp ID’s
    1. Go to https://basecamp.com/1234567/api/v1/people/9876543210/assigned_todos.json
    2. This should give a list of all the “to dos” in base camp for the user.
  4. In phpStorm got to Settings -> Tools -> Tasks -> Servers and click the + sign on the right side then select generic
  5. Under the General Tab enter the following
    1. Server URL: https://basecamp.com
    2. Username: Your user as used in #1 & #2
    3. Password: Your password as used in #1 & #2
    4. Use HTTP Authentication: True/Selected
  6. Under the Server Configuration tab enter the following
    1. Click Manage Templates Variables, and add the following variables names & values
      • Name: basecamp_account_id, Value: 1234567 (from #1), Show on first tab (selected)
      • Name: basecamp_user_id, Value: 9786543210 (from #2), Show on first tab (selected)
    2. Task List URL: {serverUrl}/{basecamp_account_id}/api/v1/people/{basecamp_user_id}/assigned_todos.json
    3. Response Type: JSON
    4. Under the Name/Path Table enter the following:
      • tasks: $
      • id: $.id
      • summary: $.name
      • description: $.description
      • updated: $.updated_at
      • created: $.created_at
      • closed: $.completed
      • issueUrl: $.url
  7. Click Apply and then OK
  8. Test this by going into open a task and all of the “todos” from Basecamp should be present

Hopefully someone finds this useful.

Leave a Reply

Your email address will not be published. Required fields are marked *