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.
- Obtain Basecamp Account ID.
- This can be done by logging into Basecamp
- You should arrive at a page with a URL like this: https://basecamp.com/1234567/
- Your Basecamp account ID is then 1234567.
- Obtain Basecamp User ID
- The above your add /api/v1/people.json, your resulting url should be something like https://basecamp.com/1234567/api/v1/people.json
- This will require you to login, user the same login as in #1
- 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.
- Verify your Basecamp ID’s
- Go to https://basecamp.com/1234567/api/v1/people/9876543210/assigned_todos.json
- This should give a list of all the “to dos” in base camp for the user.
- In phpStorm got to Settings -> Tools -> Tasks -> Servers and click the + sign on the right side then select generic
- Under the General Tab enter the following
- Server URL: https://basecamp.com
- Username: Your user as used in #1 & #2
- Password: Your password as used in #1 & #2
- Use HTTP Authentication: True/Selected
- Under the Server Configuration tab enter the following
- 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)
- Task List URL: {serverUrl}/{basecamp_account_id}/api/v1/people/{basecamp_user_id}/assigned_todos.json
- Response Type: JSON
- 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
- Click Manage Templates Variables, and add the following variables names & values
- Click Apply and then OK
- Test this by going into open a task and all of the “todos” from Basecamp should be present
Hopefully someone finds this useful.