{"action":"opened","number":866,"pull_request":{"url":"https://api.github.com/repos/18F/openFEC/pulls/866","id":36450881,"html_url":"https://github.com/18F/openFEC/pull/866","diff_url":"https://github.com/18F/openFEC/pull/866.diff","patch_url":"https://github.com/18F/openFEC/pull/866.patch","issue_url":"https://api.github.com/repos/18F/openFEC/issues/866","number":866,"state":"open","locked":false,"title":"Feature/candidate committees by cycle","user":{"login":"jmcarp","id":1633460,"avatar_url":"https://avatars.githubusercontent.com/u/1633460?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcarp","html_url":"https://github.com/jmcarp","followers_url":"https://api.github.com/users/jmcarp/followers","following_url":"https://api.github.com/users/jmcarp/following{/other_user}","gists_url":"https://api.github.com/users/jmcarp/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcarp/subscriptions","organizations_url":"https://api.github.com/users/jmcarp/orgs","repos_url":"https://api.github.com/users/jmcarp/repos","events_url":"https://api.github.com/users/jmcarp/events{/privacy}","received_events_url":"https://api.github.com/users/jmcarp/received_events","type":"User","site_admin":false},"body":"Restoring Scott Brown's principal committee in previous election cycles turned out to be a bit more complicated than expected. As @LindsayYoung discovered, we were filtering committees for a given candidate that were *active* for a particular cycle, but still getting data for the most recent filings for those committees. This means that Scott Brown's joint committee, which used to be his principal committee, always showed up as a joint committee.\r\n\r\nThis patch exposes a new route to the committee history resource at `/candidate/<candidate_id>/committees/history/<cycle>`. This allows the webapp to fetch information about a candidate's committees at the currently selected cycle. The patch also modifies the reports and totals resources to look up committees in the committee history view by cycle, if cycle is provided.\r\n\r\n[Resolves #780]","created_at":"2015-05-28T21:06:35Z","updated_at":"2015-05-28T21:06:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/18F/openFEC/pulls/866/commits","review_comments_url":"https://api.github.com/repos/18F/openFEC/pulls/866/comments","review_comment_url":"https://api.github.com/repos/18F/openFEC/pulls/comments{/number}","comments_url":"https://api.github.com/repos/18F/openFEC/issues/866/comments","statuses_url":"https://api.github.com/repos/18F/openFEC/statuses/97417f2b132728aa3ca3cb5a4f1a46509fc90bbf","head":{"label":"jmcarp:feature/candidate-committees-by-cycle","ref":"feature/candidate-committees-by-cycle","sha":"97417f2b132728aa3ca3cb5a4f1a46509fc90bbf","user":{"login":"jmcarp","id":1633460,"avatar_url":"https://avatars.githubusercontent.com/u/1633460?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcarp","html_url":"https://github.com/jmcarp","followers_url":"https://api.github.com/users/jmcarp/followers","following_url":"https://api.github.com/users/jmcarp/following{/other_user}","gists_url":"https://api.github.com/users/jmcarp/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcarp/subscriptions","organizations_url":"https://api.github.com/users/jmcarp/orgs","repos_url":"https://api.github.com/users/jmcarp/repos","events_url":"https://api.github.com/users/jmcarp/events{/privacy}","received_events_url":"https://api.github.com/users/jmcarp/received_events","type":"User","site_admin":false},"repo":{"id":33560779,"name":"openFEC","full_name":"jmcarp/openFEC","owner":{"login":"jmcarp","id":1633460,"avatar_url":"https://avatars.githubusercontent.com/u/1633460?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcarp","html_url":"https://github.com/jmcarp","followers_url":"https://api.github.com/users/jmcarp/followers","following_url":"https://api.github.com/users/jmcarp/following{/other_user}","gists_url":"https://api.github.com/users/jmcarp/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcarp/subscriptions","organizations_url":"https://api.github.com/users/jmcarp/orgs","repos_url":"https://api.github.com/users/jmcarp/repos","events_url":"https://api.github.com/users/jmcarp/events{/privacy}","received_events_url":"https://api.github.com/users/jmcarp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmcarp/openFEC","description":"An experiment in taking data from the Federal Election Commission and harmonizing/cleaning it up to make it easier for external developers to use and analyze.","fork":true,"url":"https://api.github.com/repos/jmcarp/openFEC","forks_url":"https://api.github.com/repos/jmcarp/openFEC/forks","keys_url":"https://api.github.com/repos/jmcarp/openFEC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmcarp/openFEC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmcarp/openFEC/teams","hooks_url":"https://api.github.com/repos/jmcarp/openFEC/hooks","issue_events_url":"https://api.github.com/repos/jmcarp/openFEC/issues/events{/number}","events_url":"https://api.github.com/repos/jmcarp/openFEC/events","assignees_url":"https://api.github.com/repos/jmcarp/openFEC/assignees{/user}","branches_url":"https://api.github.com/repos/jmcarp/openFEC/branches{/branch}","tags_url":"https://api.github.com/repos/jmcarp/openFEC/tags","blobs_url":"https://api.github.com/repos/jmcarp/openFEC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmcarp/openFEC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmcarp/openFEC/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmcarp/openFEC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmcarp/openFEC/statuses/{sha}","languages_url":"https://api.github.com/repos/jmcarp/openFEC/languages","stargazers_url":"https://api.github.com/repos/jmcarp/openFEC/stargazers","contributors_url":"https://api.github.com/repos/jmcarp/openFEC/contributors","subscribers_url":"https://api.github.com/repos/jmcarp/openFEC/subscribers","subscription_url":"https://api.github.com/repos/jmcarp/openFEC/subscription","commits_url":"https://api.github.com/repos/jmcarp/openFEC/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmcarp/openFEC/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmcarp/openFEC/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmcarp/openFEC/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmcarp/openFEC/contents/{+path}","compare_url":"https://api.github.com/repos/jmcarp/openFEC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmcarp/openFEC/merges","archive_url":"https://api.github.com/repos/jmcarp/openFEC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmcarp/openFEC/downloads","issues_url":"https://api.github.com/repos/jmcarp/openFEC/issues{/number}","pulls_url":"https://api.github.com/repos/jmcarp/openFEC/pulls{/number}","milestones_url":"https://api.github.com/repos/jmcarp/openFEC/milestones{/number}","notifications_url":"https://api.github.com/repos/jmcarp/openFEC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmcarp/openFEC/labels{/name}","releases_url":"https://api.github.com/repos/jmcarp/openFEC/releases{/id}","created_at":"2015-04-07T18:28:37Z","updated_at":"2015-04-07T18:28:38Z","pushed_at":"2015-05-28T21:05:00Z","git_url":"git://github.com/jmcarp/openFEC.git","ssh_url":"git@github.com:jmcarp/openFEC.git","clone_url":"https://github.com/jmcarp/openFEC.git","svn_url":"https://github.com/jmcarp/openFEC","homepage":null,"size":29344,"stargazers_count":0,"watchers_count":0,"language":"SQLPL","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"18F:develop","ref":"develop","sha":"e7d6fd7222e7fd19b24ee13c9a6423c85cf251b6","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":23116127,"name":"openFEC","full_name":"18F/openFEC","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/openFEC","description":"An experiment in taking data from the Federal Election Commission and harmonizing/cleaning it up to make it easier for external developers to use and analyze.","fork":false,"url":"https://api.github.com/repos/18F/openFEC","forks_url":"https://api.github.com/repos/18F/openFEC/forks","keys_url":"https://api.github.com/repos/18F/openFEC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/openFEC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/openFEC/teams","hooks_url":"https://api.github.com/repos/18F/openFEC/hooks","issue_events_url":"https://api.github.com/repos/18F/openFEC/issues/events{/number}","events_url":"https://api.github.com/repos/18F/openFEC/events","assignees_url":"https://api.github.com/repos/18F/openFEC/assignees{/user}","branches_url":"https://api.github.com/repos/18F/openFEC/branches{/branch}","tags_url":"https://api.github.com/repos/18F/openFEC/tags","blobs_url":"https://api.github.com/repos/18F/openFEC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/openFEC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/openFEC/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/openFEC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/openFEC/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/openFEC/languages","stargazers_url":"https://api.github.com/repos/18F/openFEC/stargazers","contributors_url":"https://api.github.com/repos/18F/openFEC/contributors","subscribers_url":"https://api.github.com/repos/18F/openFEC/subscribers","subscription_url":"https://api.github.com/repos/18F/openFEC/subscription","commits_url":"https://api.github.com/repos/18F/openFEC/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/openFEC/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/openFEC/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/openFEC/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/openFEC/contents/{+path}","compare_url":"https://api.github.com/repos/18F/openFEC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/openFEC/merges","archive_url":"https://api.github.com/repos/18F/openFEC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/openFEC/downloads","issues_url":"https://api.github.com/repos/18F/openFEC/issues{/number}","pulls_url":"https://api.github.com/repos/18F/openFEC/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/openFEC/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/openFEC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/openFEC/labels{/name}","releases_url":"https://api.github.com/repos/18F/openFEC/releases{/id}","created_at":"2014-08-19T15:51:14Z","updated_at":"2015-05-16T11:57:21Z","pushed_at":"2015-05-28T21:06:35Z","git_url":"git://github.com/18F/openFEC.git","ssh_url":"git@github.com:18F/openFEC.git","clone_url":"https://github.com/18F/openFEC.git","svn_url":"https://github.com/18F/openFEC","homepage":null,"size":33068,"stargazers_count":54,"watchers_count":54,"language":"PLpgSQL","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":126,"forks":12,"open_issues":126,"watchers":54,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/18F/openFEC/pulls/866"},"html":{"href":"https://github.com/18F/openFEC/pull/866"},"issue":{"href":"https://api.github.com/repos/18F/openFEC/issues/866"},"comments":{"href":"https://api.github.com/repos/18F/openFEC/issues/866/comments"},"review_comments":{"href":"https://api.github.com/repos/18F/openFEC/pulls/866/comments"},"review_comment":{"href":"https://api.github.com/repos/18F/openFEC/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/18F/openFEC/pulls/866/commits"},"statuses":{"href":"https://api.github.com/repos/18F/openFEC/statuses/97417f2b132728aa3ca3cb5a4f1a46509fc90bbf"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":6,"additions":159,"deletions":85,"changed_files":14}}