{"action":"created","comment":{"url":"https://api.github.com/repos/ca-cwds/intake/pulls/comments/178595813","pull_request_review_id":108676813,"id":178595813,"diff_hunk":"@@ -19,7 +19,7 @@ def index\n       def cross_report_agency\n         response = FerbAPI.make_api_call(\n           session['security_token'],\n-          \"#{ExternalRoutes.ferb_api_cross_report_agency}?countyId=#{params[:county_id]}\",\n+          \"#{FerbRoutes.cross_report_agency}?countyId=#{params[:county_id]}\",","path":"app/controllers/api/v1/system_codes_controller.rb","position":14,"original_position":14,"commit_id":"c08c9b5a9ed173f4d683a9d2f6e9a24ef15a2bcd","original_commit_id":"c08c9b5a9ed173f4d683a9d2f6e9a24ef15a2bcd","user":{"login":"money","id":1409179,"avatar_url":"https://avatars3.githubusercontent.com/u/1409179?v=4","gravatar_id":"","url":"https://api.github.com/users/money","html_url":"https://github.com/money","followers_url":"https://api.github.com/users/money/followers","following_url":"https://api.github.com/users/money/following{/other_user}","gists_url":"https://api.github.com/users/money/gists{/gist_id}","starred_url":"https://api.github.com/users/money/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/money/subscriptions","organizations_url":"https://api.github.com/users/money/orgs","repos_url":"https://api.github.com/users/money/repos","events_url":"https://api.github.com/users/money/events{/privacy}","received_events_url":"https://api.github.com/users/money/received_events","type":"User","site_admin":false},"body":"is the user input for db query being sanitized?\r\n\r\nhttps://apidock.com/rails/ActionView/Helpers/SanitizeHelper/sanitize#535-sanitize-method-not-functioning-in-controllers-models-or-libs","created_at":"2018-04-02T17:24:25Z","updated_at":"2018-04-02T17:39:24Z","html_url":"https://github.com/ca-cwds/intake/pull/598#discussion_r178595813","pull_request_url":"https://api.github.com/repos/ca-cwds/intake/pulls/598","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ca-cwds/intake/pulls/comments/178595813"},"html":{"href":"https://github.com/ca-cwds/intake/pull/598#discussion_r178595813"},"pull_request":{"href":"https://api.github.com/repos/ca-cwds/intake/pulls/598"}}},"pull_request":{"url":"https://api.github.com/repos/ca-cwds/intake/pulls/598","id":178642847,"html_url":"https://github.com/ca-cwds/intake/pull/598","diff_url":"https://github.com/ca-cwds/intake/pull/598.diff","patch_url":"https://github.com/ca-cwds/intake/pull/598.patch","issue_url":"https://api.github.com/repos/ca-cwds/intake/issues/598","number":598,"state":"open","locked":false,"title":"INT-1197 (2) - Fetch HOI for Snapshot by Client IDs","user":{"login":"wmitchell-cambria","id":36680514,"avatar_url":"https://avatars2.githubusercontent.com/u/36680514?v=4","gravatar_id":"","url":"https://api.github.com/users/wmitchell-cambria","html_url":"https://github.com/wmitchell-cambria","followers_url":"https://api.github.com/users/wmitchell-cambria/followers","following_url":"https://api.github.com/users/wmitchell-cambria/following{/other_user}","gists_url":"https://api.github.com/users/wmitchell-cambria/gists{/gist_id}","starred_url":"https://api.github.com/users/wmitchell-cambria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmitchell-cambria/subscriptions","organizations_url":"https://api.github.com/users/wmitchell-cambria/orgs","repos_url":"https://api.github.com/users/wmitchell-cambria/repos","events_url":"https://api.github.com/users/wmitchell-cambria/events{/privacy}","received_events_url":"https://api.github.com/users/wmitchell-cambria/received_events","type":"User","site_admin":false},"body":"### Jira Story\r\n\r\n- [Snapshots should not be persisted to postgres INT-1197](https://osi-cwds.atlassian.net/browse/INT-1197)\r\n\r\n## Description\r\nThis PR is the second step to decoupling Snapshot from Postgres. After adding or removing a user, we fetch the HOI for those users currently in the snapshot. Currently, we do this by unit of work ID, e.g. `/snapshot/X/history_of_involvements`. This PR makes a new Rails route to fetch HOI by client IDs via Ferb's `/client/history_of_involvements` endpoint and uses that route in Snapshot.\r\n\r\nThe full scope of INT-1197 involves the following steps. Each step will likely be its own PR.\r\n- [x] ~Fetch relationships by collection of client IDs rather than by unit of work.~ #593\r\n- [x] Fetch HOI by collection of client IDs rather than by unit of work.\r\n- [ ] Add and remove participants from the snapshot without touching postgres.\r\n- [ ] Create snapshots without creating any unit of work in postgres.\r\n\r\n## Tests\r\n- [x] I have included unit tests \r\n- [x] I have included feature tests \r\n- [ ] I have included other tests \r\n- [ ] I have NOT included tests \r\n<!--- Please indicate why tests were not added. -->\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [x] Refactoring (No behavioral changes)\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)\r\n\r\nWhile this should be an invisible refactor, I would encourage reviewers to treat it like a breaking change. It touches many parts of the HOI fetching flow from top to bottom.\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. -->\r\n- [x] My code follows the code style of this project.\r\n- [x] I have ran all tests for the project. *(Excepting some feature tests. Thanks, Jenkins)*\r\n- [x] I have ran lint/rubocop check for the changed/new files.\r\n- [x] My code is in a stable state ready to be deployable, but not necessarily complete.\r\n- [x] I promise on my honor as a CWDS developer to ensure I don't break the build, to check Lint/Rubocop, use best practices, to leave the code in better shape than I found it, and to have a good day.\r\n\r\n## Additional Notes:\r\n\r\nIf you review commit by commit, I added some messages here and there that may help. The HOI feature test commit has lots of changes, and I think there is still a lot more refactoring we could do to simplify HOI processing.\r\n","created_at":"2018-03-30T21:59:31Z","updated_at":"2018-04-02T17:39:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"65387fe85ae59b6337bb85fee9e7ba2d518fc2dd","assignee":null,"assignees":[],"requested_reviewers":[{"login":"brunoOSI","id":25443739,"avatar_url":"https://avatars1.githubusercontent.com/u/25443739?v=4","gravatar_id":"","url":"https://api.github.com/users/brunoOSI","html_url":"https://github.com/brunoOSI","followers_url":"https://api.github.com/users/brunoOSI/followers","following_url":"https://api.github.com/users/brunoOSI/following{/other_user}","gists_url":"https://api.github.com/users/brunoOSI/gists{/gist_id}","starred_url":"https://api.github.com/users/brunoOSI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunoOSI/subscriptions","organizations_url":"https://api.github.com/users/brunoOSI/orgs","repos_url":"https://api.github.com/users/brunoOSI/repos","events_url":"https://api.github.com/users/brunoOSI/events{/privacy}","received_events_url":"https://api.github.com/users/brunoOSI/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ca-cwds/intake/pulls/598/commits","review_comments_url":"https://api.github.com/repos/ca-cwds/intake/pulls/598/comments","review_comment_url":"https://api.github.com/repos/ca-cwds/intake/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ca-cwds/intake/issues/598/comments","statuses_url":"https://api.github.com/repos/ca-cwds/intake/statuses/c08c9b5a9ed173f4d683a9d2f6e9a24ef15a2bcd","head":{"label":"ca-cwds:int-1197-2-hoi-by-clientids","ref":"int-1197-2-hoi-by-clientids","sha":"c08c9b5a9ed173f4d683a9d2f6e9a24ef15a2bcd","user":{"login":"ca-cwds","id":16274270,"avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"repo":{"id":69582220,"name":"intake","full_name":"ca-cwds/intake","owner":{"login":"ca-cwds","id":16274270,"avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ca-cwds/intake","description":"CWDS Intake Digital Service","fork":false,"url":"https://api.github.com/repos/ca-cwds/intake","forks_url":"https://api.github.com/repos/ca-cwds/intake/forks","keys_url":"https://api.github.com/repos/ca-cwds/intake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ca-cwds/intake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ca-cwds/intake/teams","hooks_url":"https://api.github.com/repos/ca-cwds/intake/hooks","issue_events_url":"https://api.github.com/repos/ca-cwds/intake/issues/events{/number}","events_url":"https://api.github.com/repos/ca-cwds/intake/events","assignees_url":"https://api.github.com/repos/ca-cwds/intake/assignees{/user}","branches_url":"https://api.github.com/repos/ca-cwds/intake/branches{/branch}","tags_url":"https://api.github.com/repos/ca-cwds/intake/tags","blobs_url":"https://api.github.com/repos/ca-cwds/intake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ca-cwds/intake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ca-cwds/intake/git/refs{/sha}","trees_url":"https://api.github.com/repos/ca-cwds/intake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ca-cwds/intake/statuses/{sha}","languages_url":"https://api.github.com/repos/ca-cwds/intake/languages","stargazers_url":"https://api.github.com/repos/ca-cwds/intake/stargazers","contributors_url":"https://api.github.com/repos/ca-cwds/intake/contributors","subscribers_url":"https://api.github.com/repos/ca-cwds/intake/subscribers","subscription_url":"https://api.github.com/repos/ca-cwds/intake/subscription","commits_url":"https://api.github.com/repos/ca-cwds/intake/commits{/sha}","git_commits_url":"https://api.github.com/repos/ca-cwds/intake/git/commits{/sha}","comments_url":"https://api.github.com/repos/ca-cwds/intake/comments{/number}","issue_comment_url":"https://api.github.com/repos/ca-cwds/intake/issues/comments{/number}","contents_url":"https://api.github.com/repos/ca-cwds/intake/contents/{+path}","compare_url":"https://api.github.com/repos/ca-cwds/intake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ca-cwds/intake/merges","archive_url":"https://api.github.com/repos/ca-cwds/intake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ca-cwds/intake/downloads","issues_url":"https://api.github.com/repos/ca-cwds/intake/issues{/number}","pulls_url":"https://api.github.com/repos/ca-cwds/intake/pulls{/number}","milestones_url":"https://api.github.com/repos/ca-cwds/intake/milestones{/number}","notifications_url":"https://api.github.com/repos/ca-cwds/intake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ca-cwds/intake/labels{/name}","releases_url":"https://api.github.com/repos/ca-cwds/intake/releases{/id}","deployments_url":"https://api.github.com/repos/ca-cwds/intake/deployments","created_at":"2016-09-29T15:42:09Z","updated_at":"2018-04-02T17:37:08Z","pushed_at":"2018-04-02T17:37:06Z","git_url":"git://github.com/ca-cwds/intake.git","ssh_url":"git@github.com:ca-cwds/intake.git","clone_url":"https://github.com/ca-cwds/intake.git","svn_url":"https://github.com/ca-cwds/intake","homepage":"","size":7118,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":2,"open_issues":5,"watchers":11,"default_branch":"master"}},"base":{"label":"ca-cwds:master","ref":"master","sha":"1a72bb815765f76426ef5cbc87bcf58619a76299","user":{"login":"ca-cwds","id":16274270,"avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"repo":{"id":69582220,"name":"intake","full_name":"ca-cwds/intake","owner":{"login":"ca-cwds","id":16274270,"avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ca-cwds/intake","description":"CWDS Intake Digital Service","fork":false,"url":"https://api.github.com/repos/ca-cwds/intake","forks_url":"https://api.github.com/repos/ca-cwds/intake/forks","keys_url":"https://api.github.com/repos/ca-cwds/intake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ca-cwds/intake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ca-cwds/intake/teams","hooks_url":"https://api.github.com/repos/ca-cwds/intake/hooks","issue_events_url":"https://api.github.com/repos/ca-cwds/intake/issues/events{/number}","events_url":"https://api.github.com/repos/ca-cwds/intake/events","assignees_url":"https://api.github.com/repos/ca-cwds/intake/assignees{/user}","branches_url":"https://api.github.com/repos/ca-cwds/intake/branches{/branch}","tags_url":"https://api.github.com/repos/ca-cwds/intake/tags","blobs_url":"https://api.github.com/repos/ca-cwds/intake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ca-cwds/intake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ca-cwds/intake/git/refs{/sha}","trees_url":"https://api.github.com/repos/ca-cwds/intake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ca-cwds/intake/statuses/{sha}","languages_url":"https://api.github.com/repos/ca-cwds/intake/languages","stargazers_url":"https://api.github.com/repos/ca-cwds/intake/stargazers","contributors_url":"https://api.github.com/repos/ca-cwds/intake/contributors","subscribers_url":"https://api.github.com/repos/ca-cwds/intake/subscribers","subscription_url":"https://api.github.com/repos/ca-cwds/intake/subscription","commits_url":"https://api.github.com/repos/ca-cwds/intake/commits{/sha}","git_commits_url":"https://api.github.com/repos/ca-cwds/intake/git/commits{/sha}","comments_url":"https://api.github.com/repos/ca-cwds/intake/comments{/number}","issue_comment_url":"https://api.github.com/repos/ca-cwds/intake/issues/comments{/number}","contents_url":"https://api.github.com/repos/ca-cwds/intake/contents/{+path}","compare_url":"https://api.github.com/repos/ca-cwds/intake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ca-cwds/intake/merges","archive_url":"https://api.github.com/repos/ca-cwds/intake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ca-cwds/intake/downloads","issues_url":"https://api.github.com/repos/ca-cwds/intake/issues{/number}","pulls_url":"https://api.github.com/repos/ca-cwds/intake/pulls{/number}","milestones_url":"https://api.github.com/repos/ca-cwds/intake/milestones{/number}","notifications_url":"https://api.github.com/repos/ca-cwds/intake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ca-cwds/intake/labels{/name}","releases_url":"https://api.github.com/repos/ca-cwds/intake/releases{/id}","deployments_url":"https://api.github.com/repos/ca-cwds/intake/deployments","created_at":"2016-09-29T15:42:09Z","updated_at":"2018-04-02T17:37:08Z","pushed_at":"2018-04-02T17:37:06Z","git_url":"git://github.com/ca-cwds/intake.git","ssh_url":"git@github.com:ca-cwds/intake.git","clone_url":"https://github.com/ca-cwds/intake.git","svn_url":"https://github.com/ca-cwds/intake","homepage":"","size":7118,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":2,"open_issues":5,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ca-cwds/intake/pulls/598"},"html":{"href":"https://github.com/ca-cwds/intake/pull/598"},"issue":{"href":"https://api.github.com/repos/ca-cwds/intake/issues/598"},"comments":{"href":"https://api.github.com/repos/ca-cwds/intake/issues/598/comments"},"review_comments":{"href":"https://api.github.com/repos/ca-cwds/intake/pulls/598/comments"},"review_comment":{"href":"https://api.github.com/repos/ca-cwds/intake/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ca-cwds/intake/pulls/598/commits"},"statuses":{"href":"https://api.github.com/repos/ca-cwds/intake/statuses/c08c9b5a9ed173f4d683a9d2f6e9a24ef15a2bcd"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"money"}}