{"action":"created","issue":{"url":"https://api.github.com/repos/codeforamerica/cfapi/issues/237","labels_url":"https://api.github.com/repos/codeforamerica/cfapi/issues/237/labels{/name}","comments_url":"https://api.github.com/repos/codeforamerica/cfapi/issues/237/comments","events_url":"https://api.github.com/repos/codeforamerica/cfapi/issues/237/events","html_url":"https://github.com/codeforamerica/cfapi/pull/237","id":95870232,"number":237,"title":"Added org id with assumption it's same as name of an org but with das…","user":{"login":"ralren","id":6464062,"avatar_url":"https://avatars.githubusercontent.com/u/6464062?v=3","gravatar_id":"","url":"https://api.github.com/users/ralren","html_url":"https://github.com/ralren","followers_url":"https://api.github.com/users/ralren/followers","following_url":"https://api.github.com/users/ralren/following{/other_user}","gists_url":"https://api.github.com/users/ralren/gists{/gist_id}","starred_url":"https://api.github.com/users/ralren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralren/subscriptions","organizations_url":"https://api.github.com/users/ralren/orgs","repos_url":"https://api.github.com/users/ralren/repos","events_url":"https://api.github.com/users/ralren/events{/privacy}","received_events_url":"https://api.github.com/users/ralren/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/codeforamerica/cfapi/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-19T00:07:02Z","updated_at":"2015-07-23T04:47:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/codeforamerica/cfapi/pulls/237","html_url":"https://github.com/codeforamerica/cfapi/pull/237","diff_url":"https://github.com/codeforamerica/cfapi/pull/237.diff","patch_url":"https://github.com/codeforamerica/cfapi/pull/237.patch"},"body":"Created an id column where I assume that the id resembles the name of an organization just with dashes in place of spaces. Ran tests and everything seems fine. Do let me know if I missed something."},"comment":{"url":"https://api.github.com/repos/codeforamerica/cfapi/issues/comments/123961638","html_url":"https://github.com/codeforamerica/cfapi/pull/237#issuecomment-123961638","issue_url":"https://api.github.com/repos/codeforamerica/cfapi/issues/237","id":123961638,"user":{"login":"ondrae","id":595778,"avatar_url":"https://avatars.githubusercontent.com/u/595778?v=3","gravatar_id":"","url":"https://api.github.com/users/ondrae","html_url":"https://github.com/ondrae","followers_url":"https://api.github.com/users/ondrae/followers","following_url":"https://api.github.com/users/ondrae/following{/other_user}","gists_url":"https://api.github.com/users/ondrae/gists{/gist_id}","starred_url":"https://api.github.com/users/ondrae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ondrae/subscriptions","organizations_url":"https://api.github.com/users/ondrae/orgs","repos_url":"https://api.github.com/users/ondrae/repos","events_url":"https://api.github.com/users/ondrae/events{/privacy}","received_events_url":"https://api.github.com/users/ondrae/received_events","type":"User","site_admin":false},"created_at":"2015-07-23T04:47:01Z","updated_at":"2015-07-23T04:47:01Z","body":"Hi @ralren thanks for this pull request. This is just what we were looking for in #209.\r\n\r\nI've [cleaned it up](https://github.com/codeforamerica/cfapi/blob/add-id-%23209/app.py#L147) a little by using the functions we use elsewhere for cleaning the organization name first. \r\n\r\nI've also added the needed [migrations](https://github.com/codeforamerica/cfapi/blob/add-id-%23209/migrations/versions/532c3f11a51b_add_org_id_column.py) and a [little check](https://github.com/codeforamerica/cfapi/blob/add-id-%23209/run_update.py#L789) to update the orgs id.\r\n\r\nI've had this code running on the [staging server](https://cfapi-staging.herokuapp.com/api/organizations) for most of the day and it looks all clear. I'll merge and push it to production when I get a chance. \r\n\r\n@migurski was right though that the way we use the name and the id is a little fragile and something we'll need to revisit.\r\n\r\nThanks again though for the pull request and your help."}}