{"action":"created","comment":{"url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/pulls/comments/135424904","pull_request_review_id":58834777,"id":135424904,"diff_hunk":"@@ -64,18 +64,46 @@ object UserCurrentRegionTable {\n     val currentRegionList = _currentRegions.list\n \n     if (currentRegionList.isEmpty) {\n+      // For a new user whose current region is not assigned, assign an easy least audited region\n+      assignEasyRegion(userId)\n+    } else {\n+      // Note: Which case would this be? assignRandomly() is only called immediately after signing up or when the","path":"app/models/user/UserCurrentRegionTable.scala","position":7,"original_position":7,"commit_id":"93d2092095a48913591707ae3405116273731c6d","original_commit_id":"93d2092095a48913591707ae3405116273731c6d","user":{"login":"misaugstad","id":6518824,"avatar_url":"https://avatars2.githubusercontent.com/u/6518824?v=4","gravatar_id":"","url":"https://api.github.com/users/misaugstad","html_url":"https://github.com/misaugstad","followers_url":"https://api.github.com/users/misaugstad/followers","following_url":"https://api.github.com/users/misaugstad/following{/other_user}","gists_url":"https://api.github.com/users/misaugstad/gists{/gist_id}","starred_url":"https://api.github.com/users/misaugstad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/misaugstad/subscriptions","organizations_url":"https://api.github.com/users/misaugstad/orgs","repos_url":"https://api.github.com/users/misaugstad/repos","events_url":"https://api.github.com/users/misaugstad/events{/privacy}","received_events_url":"https://api.github.com/users/misaugstad/received_events","type":"User","site_admin":false},"body":"Not sure... It doesn't seem like this should happen. So I would probably log a warning, and call assignNextRegion, like you did.","created_at":"2017-08-27T23:56:19Z","updated_at":"2017-08-28T00:03:32Z","html_url":"https://github.com/ProjectSidewalk/SidewalkWebpage/pull/1010#discussion_r135424904","pull_request_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/pulls/1010","_links":{"self":{"href":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/pulls/comments/135424904"},"html":{"href":"https://github.com/ProjectSidewalk/SidewalkWebpage/pull/1010#discussion_r135424904"},"pull_request":{"href":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/pulls/1010"}}},"pull_request":{"url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/pulls/1010","id":136629817,"html_url":"https://github.com/ProjectSidewalk/SidewalkWebpage/pull/1010","diff_url":"https://github.com/ProjectSidewalk/SidewalkWebpage/pull/1010.diff","patch_url":"https://github.com/ProjectSidewalk/SidewalkWebpage/pull/1010.patch","issue_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/issues/1010","number":1010,"state":"open","locked":false,"title":"997 assign least audited region to new users","user":{"login":"manaswis","id":2873216,"avatar_url":"https://avatars0.githubusercontent.com/u/2873216?v=4","gravatar_id":"","url":"https://api.github.com/users/manaswis","html_url":"https://github.com/manaswis","followers_url":"https://api.github.com/users/manaswis/followers","following_url":"https://api.github.com/users/manaswis/following{/other_user}","gists_url":"https://api.github.com/users/manaswis/gists{/gist_id}","starred_url":"https://api.github.com/users/manaswis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manaswis/subscriptions","organizations_url":"https://api.github.com/users/manaswis/orgs","repos_url":"https://api.github.com/users/manaswis/repos","events_url":"https://api.github.com/users/manaswis/events{/privacy}","received_events_url":"https://api.github.com/users/manaswis/received_events","type":"User","site_admin":false},"body":"Resolves #997 \r\n\r\n- Updated front-end to assign a least audited new region to a registered user when the user selects a region that has already been completely audited by them\r\n- Modified `assignRandomly()` function to now assign regions that are least audited for a new registered user\r\n- Modify the method that assigns an easy region to an anonymous user to get least audited regions\r\n- Updated `/audit` controller to take query string in the following way:\r\n     - `/audit?nextRegion=easy` --> it will assign easy regions to a registered user -- Used for the screen that is shown when a difficult neighborhood is chosen. Accordingly, updated the link on the front end to use this. Therefore, user of `/audit/easyRegion` has been deprecated. (Added in PR #832)\r\n     - `/audit?nextRegion=regular` --> for signed in user, to be assigned a new region based on their experience level  and for anon user, another easy region -- Would be used when the neighborhood completion (across all users) screen - for the button that takes the user to a new region if they choose that option. (Issue #926)\r\n    \r\n     Both set the URL back to `/audit` to avoid any confusion for the user.\r\n\r\nTo test, try different combinations of query string to check if it works. No new region should be assigned if the string is not the appropriate one or if no query string is given. Also, test for new registered user if the regions are being assigned correctly, as well as a experienced registered user. Finally, check that anonymous users are always assigned an easy least audited region.","created_at":"2017-08-20T03:55:41Z","updated_at":"2017-08-28T00:03:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb95cf0476885139a4d20937b20325bd57ef5925","assignee":{"login":"misaugstad","id":6518824,"avatar_url":"https://avatars2.githubusercontent.com/u/6518824?v=4","gravatar_id":"","url":"https://api.github.com/users/misaugstad","html_url":"https://github.com/misaugstad","followers_url":"https://api.github.com/users/misaugstad/followers","following_url":"https://api.github.com/users/misaugstad/following{/other_user}","gists_url":"https://api.github.com/users/misaugstad/gists{/gist_id}","starred_url":"https://api.github.com/users/misaugstad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/misaugstad/subscriptions","organizations_url":"https://api.github.com/users/misaugstad/orgs","repos_url":"https://api.github.com/users/misaugstad/repos","events_url":"https://api.github.com/users/misaugstad/events{/privacy}","received_events_url":"https://api.github.com/users/misaugstad/received_events","type":"User","site_admin":false},"assignees":[{"login":"misaugstad","id":6518824,"avatar_url":"https://avatars2.githubusercontent.com/u/6518824?v=4","gravatar_id":"","url":"https://api.github.com/users/misaugstad","html_url":"https://github.com/misaugstad","followers_url":"https://api.github.com/users/misaugstad/followers","following_url":"https://api.github.com/users/misaugstad/following{/other_user}","gists_url":"https://api.github.com/users/misaugstad/gists{/gist_id}","starred_url":"https://api.github.com/users/misaugstad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/misaugstad/subscriptions","organizations_url":"https://api.github.com/users/misaugstad/orgs","repos_url":"https://api.github.com/users/misaugstad/repos","events_url":"https://api.github.com/users/misaugstad/events{/privacy}","received_events_url":"https://api.github.com/users/misaugstad/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/pulls/1010/commits","review_comments_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/pulls/1010/comments","review_comment_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/issues/1010/comments","statuses_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/statuses/93d2092095a48913591707ae3405116273731c6d","head":{"label":"ProjectSidewalk:997-assign-least-audited-region-to-new-user","ref":"997-assign-least-audited-region-to-new-user","sha":"93d2092095a48913591707ae3405116273731c6d","user":{"login":"ProjectSidewalk","id":14115044,"avatar_url":"https://avatars2.githubusercontent.com/u/14115044?v=4","gravatar_id":"","url":"https://api.github.com/users/ProjectSidewalk","html_url":"https://github.com/ProjectSidewalk","followers_url":"https://api.github.com/users/ProjectSidewalk/followers","following_url":"https://api.github.com/users/ProjectSidewalk/following{/other_user}","gists_url":"https://api.github.com/users/ProjectSidewalk/gists{/gist_id}","starred_url":"https://api.github.com/users/ProjectSidewalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProjectSidewalk/subscriptions","organizations_url":"https://api.github.com/users/ProjectSidewalk/orgs","repos_url":"https://api.github.com/users/ProjectSidewalk/repos","events_url":"https://api.github.com/users/ProjectSidewalk/events{/privacy}","received_events_url":"https://api.github.com/users/ProjectSidewalk/received_events","type":"Organization","site_admin":false},"repo":{"id":39593035,"name":"SidewalkWebpage","full_name":"ProjectSidewalk/SidewalkWebpage","owner":{"login":"ProjectSidewalk","id":14115044,"avatar_url":"https://avatars2.githubusercontent.com/u/14115044?v=4","gravatar_id":"","url":"https://api.github.com/users/ProjectSidewalk","html_url":"https://github.com/ProjectSidewalk","followers_url":"https://api.github.com/users/ProjectSidewalk/followers","following_url":"https://api.github.com/users/ProjectSidewalk/following{/other_user}","gists_url":"https://api.github.com/users/ProjectSidewalk/gists{/gist_id}","starred_url":"https://api.github.com/users/ProjectSidewalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProjectSidewalk/subscriptions","organizations_url":"https://api.github.com/users/ProjectSidewalk/orgs","repos_url":"https://api.github.com/users/ProjectSidewalk/repos","events_url":"https://api.github.com/users/ProjectSidewalk/events{/privacy}","received_events_url":"https://api.github.com/users/ProjectSidewalk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ProjectSidewalk/SidewalkWebpage","description":"Project Sidewalk web page","fork":false,"url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage","forks_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/forks","keys_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/teams","hooks_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/hooks","issue_events_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/issues/events{/number}","events_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/events","assignees_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/assignees{/user}","branches_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/branches{/branch}","tags_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/tags","blobs_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/git/refs{/sha}","trees_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/statuses/{sha}","languages_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/languages","stargazers_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/stargazers","contributors_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/contributors","subscribers_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/subscribers","subscription_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/subscription","commits_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/commits{/sha}","git_commits_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/git/commits{/sha}","comments_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/comments{/number}","issue_comment_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/issues/comments{/number}","contents_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/contents/{+path}","compare_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/merges","archive_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/downloads","issues_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/issues{/number}","pulls_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/pulls{/number}","milestones_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/milestones{/number}","notifications_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/labels{/name}","releases_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/releases{/id}","deployments_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/deployments","created_at":"2015-07-23T21:09:48Z","updated_at":"2017-08-19T13:57:04Z","pushed_at":"2017-08-27T00:39:31Z","git_url":"git://github.com/ProjectSidewalk/SidewalkWebpage.git","ssh_url":"git@github.com:ProjectSidewalk/SidewalkWebpage.git","clone_url":"https://github.com/ProjectSidewalk/SidewalkWebpage.git","svn_url":"https://github.com/ProjectSidewalk/SidewalkWebpage","homepage":"http://projectsidewalk.io","size":236185,"stargazers_count":17,"watchers_count":17,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":257,"forks":3,"open_issues":257,"watchers":17,"default_branch":"master"}},"base":{"label":"ProjectSidewalk:develop","ref":"develop","sha":"69ca7ebe86e9b9e75a1db3e9ab3503810e6ec718","user":{"login":"ProjectSidewalk","id":14115044,"avatar_url":"https://avatars2.githubusercontent.com/u/14115044?v=4","gravatar_id":"","url":"https://api.github.com/users/ProjectSidewalk","html_url":"https://github.com/ProjectSidewalk","followers_url":"https://api.github.com/users/ProjectSidewalk/followers","following_url":"https://api.github.com/users/ProjectSidewalk/following{/other_user}","gists_url":"https://api.github.com/users/ProjectSidewalk/gists{/gist_id}","starred_url":"https://api.github.com/users/ProjectSidewalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProjectSidewalk/subscriptions","organizations_url":"https://api.github.com/users/ProjectSidewalk/orgs","repos_url":"https://api.github.com/users/ProjectSidewalk/repos","events_url":"https://api.github.com/users/ProjectSidewalk/events{/privacy}","received_events_url":"https://api.github.com/users/ProjectSidewalk/received_events","type":"Organization","site_admin":false},"repo":{"id":39593035,"name":"SidewalkWebpage","full_name":"ProjectSidewalk/SidewalkWebpage","owner":{"login":"ProjectSidewalk","id":14115044,"avatar_url":"https://avatars2.githubusercontent.com/u/14115044?v=4","gravatar_id":"","url":"https://api.github.com/users/ProjectSidewalk","html_url":"https://github.com/ProjectSidewalk","followers_url":"https://api.github.com/users/ProjectSidewalk/followers","following_url":"https://api.github.com/users/ProjectSidewalk/following{/other_user}","gists_url":"https://api.github.com/users/ProjectSidewalk/gists{/gist_id}","starred_url":"https://api.github.com/users/ProjectSidewalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProjectSidewalk/subscriptions","organizations_url":"https://api.github.com/users/ProjectSidewalk/orgs","repos_url":"https://api.github.com/users/ProjectSidewalk/repos","events_url":"https://api.github.com/users/ProjectSidewalk/events{/privacy}","received_events_url":"https://api.github.com/users/ProjectSidewalk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ProjectSidewalk/SidewalkWebpage","description":"Project Sidewalk web page","fork":false,"url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage","forks_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/forks","keys_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/teams","hooks_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/hooks","issue_events_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/issues/events{/number}","events_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/events","assignees_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/assignees{/user}","branches_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/branches{/branch}","tags_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/tags","blobs_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/git/refs{/sha}","trees_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/statuses/{sha}","languages_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/languages","stargazers_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/stargazers","contributors_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/contributors","subscribers_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/subscribers","subscription_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/subscription","commits_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/commits{/sha}","git_commits_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/git/commits{/sha}","comments_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/comments{/number}","issue_comment_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/issues/comments{/number}","contents_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/contents/{+path}","compare_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/merges","archive_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/downloads","issues_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/issues{/number}","pulls_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/pulls{/number}","milestones_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/milestones{/number}","notifications_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/labels{/name}","releases_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/releases{/id}","deployments_url":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/deployments","created_at":"2015-07-23T21:09:48Z","updated_at":"2017-08-19T13:57:04Z","pushed_at":"2017-08-27T00:39:31Z","git_url":"git://github.com/ProjectSidewalk/SidewalkWebpage.git","ssh_url":"git@github.com:ProjectSidewalk/SidewalkWebpage.git","clone_url":"https://github.com/ProjectSidewalk/SidewalkWebpage.git","svn_url":"https://github.com/ProjectSidewalk/SidewalkWebpage","homepage":"http://projectsidewalk.io","size":236185,"stargazers_count":17,"watchers_count":17,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":257,"forks":3,"open_issues":257,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/pulls/1010"},"html":{"href":"https://github.com/ProjectSidewalk/SidewalkWebpage/pull/1010"},"issue":{"href":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/issues/1010"},"comments":{"href":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/issues/1010/comments"},"review_comments":{"href":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/pulls/1010/comments"},"review_comment":{"href":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/pulls/1010/commits"},"statuses":{"href":"https://api.github.com/repos/ProjectSidewalk/SidewalkWebpage/statuses/93d2092095a48913591707ae3405116273731c6d"}}}}
{"actor":{"display_login":"misaugstad"}}