{"action":"created","comment":{"url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/pulls/comments/233755217","pull_request_review_id":175242608,"id":233755217,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzc1NTIxNw==","diff_hunk":"@@ -86,8 +85,67 @@ private void setSystemSetting(Request actorMessage) {\n     ProjectLogger.log(\"SystemSettingsActor: setSystemSetting called\", LoggerEnum.DEBUG.name());\n \n     Map<String, Object> req = actorMessage.getRequest();\n+    if (((String) req.get(JsonKey.FIELD)).equalsIgnoreCase(JsonKey.PHONE_UNIQUE)) {\n+      checkEmailOrPhoneData(\n+          (String) req.get(JsonKey.FIELD),\n+          (String) req.get(JsonKey.VALUE),\n+          JsonKey.ENC_PHONE,\n+          ResponseCode.duplicatePhoneData,\n+          JsonKey.PHONE);\n+    }\n+    if (((String) req.get(JsonKey.FIELD)).equalsIgnoreCase(JsonKey.EMAIL_UNIQUE)) {\n+      checkEmailOrPhoneData(\n+          (String) req.get(JsonKey.FIELD),\n+          (String) req.get(JsonKey.VALUE),\n+          JsonKey.ENC_EMAIL,\n+          ResponseCode.duplicateEmailData,\n+          JsonKey.EMAIL);\n+    }\n     SystemSetting systemSetting = mapper.convertValue(req, SystemSetting.class);\n     Response response = systemSettingDaoImpl.write(systemSetting);\n     sender().tell(response, self());\n   }\n+\n+  private void checkEmailOrPhoneData(\n+      String field, String value, String facetsKey, ResponseCode responseCode, String objectType) {\n+    SystemSetting systemSetting = systemSettingDaoImpl.readByField(field);\n+\n+    if (systemSetting != null) {\n+      boolean dbUniqueValue = Boolean.parseBoolean(systemSetting.getValue());","path":"actors/systemsettings/src/main/java/org/sunbird/systemsettings/actors/SystemSettingsActor.java","position":71,"original_position":71,"commit_id":"a5776a445db2f08a4631383cdf839ee9d1bed170","original_commit_id":"a5776a445db2f08a4631383cdf839ee9d1bed170","user":{"login":"bvinayakumar","id":36028332,"node_id":"MDQ6VXNlcjM2MDI4MzMy","avatar_url":"https://avatars3.githubusercontent.com/u/36028332?v=4","gravatar_id":"","url":"https://api.github.com/users/bvinayakumar","html_url":"https://github.com/bvinayakumar","followers_url":"https://api.github.com/users/bvinayakumar/followers","following_url":"https://api.github.com/users/bvinayakumar/following{/other_user}","gists_url":"https://api.github.com/users/bvinayakumar/gists{/gist_id}","starred_url":"https://api.github.com/users/bvinayakumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bvinayakumar/subscriptions","organizations_url":"https://api.github.com/users/bvinayakumar/orgs","repos_url":"https://api.github.com/users/bvinayakumar/repos","events_url":"https://api.github.com/users/bvinayakumar/events{/privacy}","received_events_url":"https://api.github.com/users/bvinayakumar/received_events","type":"User","site_admin":false},"body":"dbUniqueValue -> existingValue","created_at":"2018-11-15T08:53:05Z","updated_at":"2018-11-15T08:53:06Z","html_url":"https://github.com/project-sunbird/sunbird-lms-mw/pull/240#discussion_r233755217","pull_request_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/pulls/240","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/pulls/comments/233755217"},"html":{"href":"https://github.com/project-sunbird/sunbird-lms-mw/pull/240#discussion_r233755217"},"pull_request":{"href":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/pulls/240"}}},"pull_request":{"url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/pulls/240","id":230918199,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwOTE4MTk5","html_url":"https://github.com/project-sunbird/sunbird-lms-mw/pull/240","diff_url":"https://github.com/project-sunbird/sunbird-lms-mw/pull/240.diff","patch_url":"https://github.com/project-sunbird/sunbird-lms-mw/pull/240.patch","issue_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/issues/240","number":240,"state":"open","locked":false,"title":"Issue #SB-8330 fix: system setting merge update","user":{"login":"rajatgupta0889","id":4358536,"node_id":"MDQ6VXNlcjQzNTg1MzY=","avatar_url":"https://avatars1.githubusercontent.com/u/4358536?v=4","gravatar_id":"","url":"https://api.github.com/users/rajatgupta0889","html_url":"https://github.com/rajatgupta0889","followers_url":"https://api.github.com/users/rajatgupta0889/followers","following_url":"https://api.github.com/users/rajatgupta0889/following{/other_user}","gists_url":"https://api.github.com/users/rajatgupta0889/gists{/gist_id}","starred_url":"https://api.github.com/users/rajatgupta0889/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajatgupta0889/subscriptions","organizations_url":"https://api.github.com/users/rajatgupta0889/orgs","repos_url":"https://api.github.com/users/rajatgupta0889/repos","events_url":"https://api.github.com/users/rajatgupta0889/events{/privacy}","received_events_url":"https://api.github.com/users/rajatgupta0889/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-14T17:23:55Z","updated_at":"2018-11-15T08:53:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0edc23bcff01f39e95611718da7ce1fce0e400bf","assignee":null,"assignees":[],"requested_reviewers":[{"login":"amolnin","id":42316446,"node_id":"MDQ6VXNlcjQyMzE2NDQ2","avatar_url":"https://avatars0.githubusercontent.com/u/42316446?v=4","gravatar_id":"","url":"https://api.github.com/users/amolnin","html_url":"https://github.com/amolnin","followers_url":"https://api.github.com/users/amolnin/followers","following_url":"https://api.github.com/users/amolnin/following{/other_user}","gists_url":"https://api.github.com/users/amolnin/gists{/gist_id}","starred_url":"https://api.github.com/users/amolnin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amolnin/subscriptions","organizations_url":"https://api.github.com/users/amolnin/orgs","repos_url":"https://api.github.com/users/amolnin/repos","events_url":"https://api.github.com/users/amolnin/events{/privacy}","received_events_url":"https://api.github.com/users/amolnin/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/pulls/240/commits","review_comments_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/pulls/240/comments","review_comment_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/pulls/comments{/number}","comments_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/issues/240/comments","statuses_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/statuses/a5776a445db2f08a4631383cdf839ee9d1bed170","head":{"label":"project-sunbird:SB-8330","ref":"SB-8330","sha":"a5776a445db2f08a4631383cdf839ee9d1bed170","user":{"login":"project-sunbird","id":26705730,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2NzA1NzMw","avatar_url":"https://avatars1.githubusercontent.com/u/26705730?v=4","gravatar_id":"","url":"https://api.github.com/users/project-sunbird","html_url":"https://github.com/project-sunbird","followers_url":"https://api.github.com/users/project-sunbird/followers","following_url":"https://api.github.com/users/project-sunbird/following{/other_user}","gists_url":"https://api.github.com/users/project-sunbird/gists{/gist_id}","starred_url":"https://api.github.com/users/project-sunbird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-sunbird/subscriptions","organizations_url":"https://api.github.com/users/project-sunbird/orgs","repos_url":"https://api.github.com/users/project-sunbird/repos","events_url":"https://api.github.com/users/project-sunbird/events{/privacy}","received_events_url":"https://api.github.com/users/project-sunbird/received_events","type":"Organization","site_admin":false},"repo":{"id":96122408,"node_id":"MDEwOlJlcG9zaXRvcnk5NjEyMjQwOA==","name":"sunbird-lms-mw","full_name":"project-sunbird/sunbird-lms-mw","private":false,"owner":{"login":"project-sunbird","id":26705730,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2NzA1NzMw","avatar_url":"https://avatars1.githubusercontent.com/u/26705730?v=4","gravatar_id":"","url":"https://api.github.com/users/project-sunbird","html_url":"https://github.com/project-sunbird","followers_url":"https://api.github.com/users/project-sunbird/followers","following_url":"https://api.github.com/users/project-sunbird/following{/other_user}","gists_url":"https://api.github.com/users/project-sunbird/gists{/gist_id}","starred_url":"https://api.github.com/users/project-sunbird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-sunbird/subscriptions","organizations_url":"https://api.github.com/users/project-sunbird/orgs","repos_url":"https://api.github.com/users/project-sunbird/repos","events_url":"https://api.github.com/users/project-sunbird/events{/privacy}","received_events_url":"https://api.github.com/users/project-sunbird/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/project-sunbird/sunbird-lms-mw","description":"Middleware components of Sunbird learning management system","fork":false,"url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw","forks_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/forks","keys_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/teams","hooks_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/hooks","issue_events_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/issues/events{/number}","events_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/events","assignees_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/assignees{/user}","branches_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/branches{/branch}","tags_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/tags","blobs_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/git/refs{/sha}","trees_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/statuses/{sha}","languages_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/languages","stargazers_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/stargazers","contributors_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/contributors","subscribers_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/subscribers","subscription_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/subscription","commits_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/commits{/sha}","git_commits_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/git/commits{/sha}","comments_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/comments{/number}","issue_comment_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/issues/comments{/number}","contents_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/contents/{+path}","compare_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/merges","archive_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/downloads","issues_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/issues{/number}","pulls_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/pulls{/number}","milestones_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/milestones{/number}","notifications_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/labels{/name}","releases_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/releases{/id}","deployments_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/deployments","created_at":"2017-07-03T14:57:51Z","updated_at":"2018-10-16T09:00:55Z","pushed_at":"2018-11-15T07:42:38Z","git_url":"git://github.com/project-sunbird/sunbird-lms-mw.git","ssh_url":"git@github.com:project-sunbird/sunbird-lms-mw.git","clone_url":"https://github.com/project-sunbird/sunbird-lms-mw.git","svn_url":"https://github.com/project-sunbird/sunbird-lms-mw","homepage":null,"size":11801,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":11,"open_issues":11,"watchers":4,"default_branch":"master"}},"base":{"label":"project-sunbird:release-1.12","ref":"release-1.12","sha":"6ecd5ba16889638cf25c8c805ddd9183e6efc44c","user":{"login":"project-sunbird","id":26705730,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2NzA1NzMw","avatar_url":"https://avatars1.githubusercontent.com/u/26705730?v=4","gravatar_id":"","url":"https://api.github.com/users/project-sunbird","html_url":"https://github.com/project-sunbird","followers_url":"https://api.github.com/users/project-sunbird/followers","following_url":"https://api.github.com/users/project-sunbird/following{/other_user}","gists_url":"https://api.github.com/users/project-sunbird/gists{/gist_id}","starred_url":"https://api.github.com/users/project-sunbird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-sunbird/subscriptions","organizations_url":"https://api.github.com/users/project-sunbird/orgs","repos_url":"https://api.github.com/users/project-sunbird/repos","events_url":"https://api.github.com/users/project-sunbird/events{/privacy}","received_events_url":"https://api.github.com/users/project-sunbird/received_events","type":"Organization","site_admin":false},"repo":{"id":96122408,"node_id":"MDEwOlJlcG9zaXRvcnk5NjEyMjQwOA==","name":"sunbird-lms-mw","full_name":"project-sunbird/sunbird-lms-mw","private":false,"owner":{"login":"project-sunbird","id":26705730,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2NzA1NzMw","avatar_url":"https://avatars1.githubusercontent.com/u/26705730?v=4","gravatar_id":"","url":"https://api.github.com/users/project-sunbird","html_url":"https://github.com/project-sunbird","followers_url":"https://api.github.com/users/project-sunbird/followers","following_url":"https://api.github.com/users/project-sunbird/following{/other_user}","gists_url":"https://api.github.com/users/project-sunbird/gists{/gist_id}","starred_url":"https://api.github.com/users/project-sunbird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-sunbird/subscriptions","organizations_url":"https://api.github.com/users/project-sunbird/orgs","repos_url":"https://api.github.com/users/project-sunbird/repos","events_url":"https://api.github.com/users/project-sunbird/events{/privacy}","received_events_url":"https://api.github.com/users/project-sunbird/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/project-sunbird/sunbird-lms-mw","description":"Middleware components of Sunbird learning management system","fork":false,"url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw","forks_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/forks","keys_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/teams","hooks_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/hooks","issue_events_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/issues/events{/number}","events_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/events","assignees_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/assignees{/user}","branches_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/branches{/branch}","tags_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/tags","blobs_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/git/refs{/sha}","trees_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/statuses/{sha}","languages_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/languages","stargazers_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/stargazers","contributors_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/contributors","subscribers_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/subscribers","subscription_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/subscription","commits_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/commits{/sha}","git_commits_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/git/commits{/sha}","comments_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/comments{/number}","issue_comment_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/issues/comments{/number}","contents_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/contents/{+path}","compare_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/merges","archive_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/downloads","issues_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/issues{/number}","pulls_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/pulls{/number}","milestones_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/milestones{/number}","notifications_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/labels{/name}","releases_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/releases{/id}","deployments_url":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/deployments","created_at":"2017-07-03T14:57:51Z","updated_at":"2018-10-16T09:00:55Z","pushed_at":"2018-11-15T07:42:38Z","git_url":"git://github.com/project-sunbird/sunbird-lms-mw.git","ssh_url":"git@github.com:project-sunbird/sunbird-lms-mw.git","clone_url":"https://github.com/project-sunbird/sunbird-lms-mw.git","svn_url":"https://github.com/project-sunbird/sunbird-lms-mw","homepage":null,"size":11801,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":11,"open_issues":11,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/pulls/240"},"html":{"href":"https://github.com/project-sunbird/sunbird-lms-mw/pull/240"},"issue":{"href":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/issues/240"},"comments":{"href":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/issues/240/comments"},"review_comments":{"href":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/pulls/240/comments"},"review_comment":{"href":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/pulls/240/commits"},"statuses":{"href":"https://api.github.com/repos/project-sunbird/sunbird-lms-mw/statuses/a5776a445db2f08a4631383cdf839ee9d1bed170"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"bvinayakumar"}}