{"action":"created","comment":{"url":"https://api.github.com/repos/exodev/social/pulls/comments/55376177","id":55376177,"diff_hunk":"@@ -452,9 +452,9 @@ private void fillSpaceFromModel(Space space, SpaceEntity model) {\n       space.setPrettyName(groupId);\n     }\n     \n-    if (model.getVisibility() != null && (model.getVisibility().equals(Space.HIDDEN) \n-        || model.getVisibility().equals(Space.PRIVATE))) {\n-      space.setVisibility(model.getVisibility());\n+    if (model.getVisibility() != null && (model.getVisibility().toLowerCase().equals(Space.HIDDEN)","path":"component/service/src/main/java/org/exoplatform/social/rest/impl/space/SpaceRestResourcesV1.java","position":7,"original_position":7,"commit_id":"cab1ac0e54f6392ba68cbb10b6f52dda5537d487","original_commit_id":"cab1ac0e54f6392ba68cbb10b6f52dda5537d487","user":{"login":"thomasdelhomenie","id":342645,"avatar_url":"https://avatars.githubusercontent.com/u/342645?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasdelhomenie","html_url":"https://github.com/thomasdelhomenie","followers_url":"https://api.github.com/users/thomasdelhomenie/followers","following_url":"https://api.github.com/users/thomasdelhomenie/following{/other_user}","gists_url":"https://api.github.com/users/thomasdelhomenie/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasdelhomenie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasdelhomenie/subscriptions","organizations_url":"https://api.github.com/users/thomasdelhomenie/orgs","repos_url":"https://api.github.com/users/thomasdelhomenie/repos","events_url":"https://api.github.com/users/thomasdelhomenie/events{/privacy}","received_events_url":"https://api.github.com/users/thomasdelhomenie/received_events","type":"User","site_admin":false},"body":"Could be simplified like this IMO :\r\n\r\nif (Space.HIDDEN.equalsIgnoreCase(model.getVisibility())) {\r\n  space.setVisibility(Space.HIDDEN);\r\n} else {\r\n  space.setVisibility(Space.PRIVATE);\r\n}","created_at":"2016-03-08T15:37:18Z","updated_at":"2016-03-08T15:37:18Z","html_url":"https://github.com/exodev/social/pull/55#discussion_r55376177","pull_request_url":"https://api.github.com/repos/exodev/social/pulls/55","_links":{"self":{"href":"https://api.github.com/repos/exodev/social/pulls/comments/55376177"},"html":{"href":"https://github.com/exodev/social/pull/55#discussion_r55376177"},"pull_request":{"href":"https://api.github.com/repos/exodev/social/pulls/55"}}},"pull_request":{"url":"https://api.github.com/repos/exodev/social/pulls/55","id":62075388,"html_url":"https://github.com/exodev/social/pull/55","diff_url":"https://github.com/exodev/social/pull/55.diff","patch_url":"https://github.com/exodev/social/pull/55.patch","issue_url":"https://api.github.com/repos/exodev/social/issues/55","number":55,"state":"open","locked":false,"title":"[SOC-5238] Visiblity attribute is not changed when updating a space using REST API","user":{"login":"smartytwiti","id":7538862,"avatar_url":"https://avatars.githubusercontent.com/u/7538862?v=3","gravatar_id":"","url":"https://api.github.com/users/smartytwiti","html_url":"https://github.com/smartytwiti","followers_url":"https://api.github.com/users/smartytwiti/followers","following_url":"https://api.github.com/users/smartytwiti/following{/other_user}","gists_url":"https://api.github.com/users/smartytwiti/gists{/gist_id}","starred_url":"https://api.github.com/users/smartytwiti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smartytwiti/subscriptions","organizations_url":"https://api.github.com/users/smartytwiti/orgs","repos_url":"https://api.github.com/users/smartytwiti/repos","events_url":"https://api.github.com/users/smartytwiti/events{/privacy}","received_events_url":"https://api.github.com/users/smartytwiti/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-08T14:08:07Z","updated_at":"2016-03-08T15:37:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ca00eca11b35476c667ca2816581a76ae93dbfc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/exodev/social/pulls/55/commits","review_comments_url":"https://api.github.com/repos/exodev/social/pulls/55/comments","review_comment_url":"https://api.github.com/repos/exodev/social/pulls/comments{/number}","comments_url":"https://api.github.com/repos/exodev/social/issues/55/comments","statuses_url":"https://api.github.com/repos/exodev/social/statuses/cab1ac0e54f6392ba68cbb10b6f52dda5537d487","head":{"label":"exodev:fix/SOC-5238","ref":"fix/SOC-5238","sha":"cab1ac0e54f6392ba68cbb10b6f52dda5537d487","user":{"login":"exodev","id":1606522,"avatar_url":"https://avatars.githubusercontent.com/u/1606522?v=3","gravatar_id":"","url":"https://api.github.com/users/exodev","html_url":"https://github.com/exodev","followers_url":"https://api.github.com/users/exodev/followers","following_url":"https://api.github.com/users/exodev/following{/other_user}","gists_url":"https://api.github.com/users/exodev/gists{/gist_id}","starred_url":"https://api.github.com/users/exodev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exodev/subscriptions","organizations_url":"https://api.github.com/users/exodev/orgs","repos_url":"https://api.github.com/users/exodev/repos","events_url":"https://api.github.com/users/exodev/events{/privacy}","received_events_url":"https://api.github.com/users/exodev/received_events","type":"Organization","site_admin":false},"repo":{"id":4003303,"name":"social","full_name":"exodev/social","owner":{"login":"exodev","id":1606522,"avatar_url":"https://avatars.githubusercontent.com/u/1606522?v=3","gravatar_id":"","url":"https://api.github.com/users/exodev","html_url":"https://github.com/exodev","followers_url":"https://api.github.com/users/exodev/followers","following_url":"https://api.github.com/users/exodev/following{/other_user}","gists_url":"https://api.github.com/users/exodev/gists{/gist_id}","starred_url":"https://api.github.com/users/exodev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exodev/subscriptions","organizations_url":"https://api.github.com/users/exodev/orgs","repos_url":"https://api.github.com/users/exodev/repos","events_url":"https://api.github.com/users/exodev/events{/privacy}","received_events_url":"https://api.github.com/users/exodev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/exodev/social","description":"eXo Social","fork":true,"url":"https://api.github.com/repos/exodev/social","forks_url":"https://api.github.com/repos/exodev/social/forks","keys_url":"https://api.github.com/repos/exodev/social/keys{/key_id}","collaborators_url":"https://api.github.com/repos/exodev/social/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/exodev/social/teams","hooks_url":"https://api.github.com/repos/exodev/social/hooks","issue_events_url":"https://api.github.com/repos/exodev/social/issues/events{/number}","events_url":"https://api.github.com/repos/exodev/social/events","assignees_url":"https://api.github.com/repos/exodev/social/assignees{/user}","branches_url":"https://api.github.com/repos/exodev/social/branches{/branch}","tags_url":"https://api.github.com/repos/exodev/social/tags","blobs_url":"https://api.github.com/repos/exodev/social/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/exodev/social/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/exodev/social/git/refs{/sha}","trees_url":"https://api.github.com/repos/exodev/social/git/trees{/sha}","statuses_url":"https://api.github.com/repos/exodev/social/statuses/{sha}","languages_url":"https://api.github.com/repos/exodev/social/languages","stargazers_url":"https://api.github.com/repos/exodev/social/stargazers","contributors_url":"https://api.github.com/repos/exodev/social/contributors","subscribers_url":"https://api.github.com/repos/exodev/social/subscribers","subscription_url":"https://api.github.com/repos/exodev/social/subscription","commits_url":"https://api.github.com/repos/exodev/social/commits{/sha}","git_commits_url":"https://api.github.com/repos/exodev/social/git/commits{/sha}","comments_url":"https://api.github.com/repos/exodev/social/comments{/number}","issue_comment_url":"https://api.github.com/repos/exodev/social/issues/comments{/number}","contents_url":"https://api.github.com/repos/exodev/social/contents/{+path}","compare_url":"https://api.github.com/repos/exodev/social/compare/{base}...{head}","merges_url":"https://api.github.com/repos/exodev/social/merges","archive_url":"https://api.github.com/repos/exodev/social/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/exodev/social/downloads","issues_url":"https://api.github.com/repos/exodev/social/issues{/number}","pulls_url":"https://api.github.com/repos/exodev/social/pulls{/number}","milestones_url":"https://api.github.com/repos/exodev/social/milestones{/number}","notifications_url":"https://api.github.com/repos/exodev/social/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/exodev/social/labels{/name}","releases_url":"https://api.github.com/repos/exodev/social/releases{/id}","deployments_url":"https://api.github.com/repos/exodev/social/deployments","created_at":"2012-04-12T09:45:16Z","updated_at":"2015-05-08T02:51:58Z","pushed_at":"2016-03-08T14:08:07Z","git_url":"git://github.com/exodev/social.git","ssh_url":"git@github.com:exodev/social.git","clone_url":"https://github.com/exodev/social.git","svn_url":"https://github.com/exodev/social","homepage":null,"size":37016,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":9,"forks":14,"open_issues":9,"watchers":6,"default_branch":"develop"}},"base":{"label":"exodev:develop","ref":"develop","sha":"1e0755ebba3229160319e81661b1cbae58c20bbd","user":{"login":"exodev","id":1606522,"avatar_url":"https://avatars.githubusercontent.com/u/1606522?v=3","gravatar_id":"","url":"https://api.github.com/users/exodev","html_url":"https://github.com/exodev","followers_url":"https://api.github.com/users/exodev/followers","following_url":"https://api.github.com/users/exodev/following{/other_user}","gists_url":"https://api.github.com/users/exodev/gists{/gist_id}","starred_url":"https://api.github.com/users/exodev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exodev/subscriptions","organizations_url":"https://api.github.com/users/exodev/orgs","repos_url":"https://api.github.com/users/exodev/repos","events_url":"https://api.github.com/users/exodev/events{/privacy}","received_events_url":"https://api.github.com/users/exodev/received_events","type":"Organization","site_admin":false},"repo":{"id":4003303,"name":"social","full_name":"exodev/social","owner":{"login":"exodev","id":1606522,"avatar_url":"https://avatars.githubusercontent.com/u/1606522?v=3","gravatar_id":"","url":"https://api.github.com/users/exodev","html_url":"https://github.com/exodev","followers_url":"https://api.github.com/users/exodev/followers","following_url":"https://api.github.com/users/exodev/following{/other_user}","gists_url":"https://api.github.com/users/exodev/gists{/gist_id}","starred_url":"https://api.github.com/users/exodev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exodev/subscriptions","organizations_url":"https://api.github.com/users/exodev/orgs","repos_url":"https://api.github.com/users/exodev/repos","events_url":"https://api.github.com/users/exodev/events{/privacy}","received_events_url":"https://api.github.com/users/exodev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/exodev/social","description":"eXo Social","fork":true,"url":"https://api.github.com/repos/exodev/social","forks_url":"https://api.github.com/repos/exodev/social/forks","keys_url":"https://api.github.com/repos/exodev/social/keys{/key_id}","collaborators_url":"https://api.github.com/repos/exodev/social/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/exodev/social/teams","hooks_url":"https://api.github.com/repos/exodev/social/hooks","issue_events_url":"https://api.github.com/repos/exodev/social/issues/events{/number}","events_url":"https://api.github.com/repos/exodev/social/events","assignees_url":"https://api.github.com/repos/exodev/social/assignees{/user}","branches_url":"https://api.github.com/repos/exodev/social/branches{/branch}","tags_url":"https://api.github.com/repos/exodev/social/tags","blobs_url":"https://api.github.com/repos/exodev/social/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/exodev/social/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/exodev/social/git/refs{/sha}","trees_url":"https://api.github.com/repos/exodev/social/git/trees{/sha}","statuses_url":"https://api.github.com/repos/exodev/social/statuses/{sha}","languages_url":"https://api.github.com/repos/exodev/social/languages","stargazers_url":"https://api.github.com/repos/exodev/social/stargazers","contributors_url":"https://api.github.com/repos/exodev/social/contributors","subscribers_url":"https://api.github.com/repos/exodev/social/subscribers","subscription_url":"https://api.github.com/repos/exodev/social/subscription","commits_url":"https://api.github.com/repos/exodev/social/commits{/sha}","git_commits_url":"https://api.github.com/repos/exodev/social/git/commits{/sha}","comments_url":"https://api.github.com/repos/exodev/social/comments{/number}","issue_comment_url":"https://api.github.com/repos/exodev/social/issues/comments{/number}","contents_url":"https://api.github.com/repos/exodev/social/contents/{+path}","compare_url":"https://api.github.com/repos/exodev/social/compare/{base}...{head}","merges_url":"https://api.github.com/repos/exodev/social/merges","archive_url":"https://api.github.com/repos/exodev/social/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/exodev/social/downloads","issues_url":"https://api.github.com/repos/exodev/social/issues{/number}","pulls_url":"https://api.github.com/repos/exodev/social/pulls{/number}","milestones_url":"https://api.github.com/repos/exodev/social/milestones{/number}","notifications_url":"https://api.github.com/repos/exodev/social/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/exodev/social/labels{/name}","releases_url":"https://api.github.com/repos/exodev/social/releases{/id}","deployments_url":"https://api.github.com/repos/exodev/social/deployments","created_at":"2012-04-12T09:45:16Z","updated_at":"2015-05-08T02:51:58Z","pushed_at":"2016-03-08T14:08:07Z","git_url":"git://github.com/exodev/social.git","ssh_url":"git@github.com:exodev/social.git","clone_url":"https://github.com/exodev/social.git","svn_url":"https://github.com/exodev/social","homepage":null,"size":37016,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":9,"forks":14,"open_issues":9,"watchers":6,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/exodev/social/pulls/55"},"html":{"href":"https://github.com/exodev/social/pull/55"},"issue":{"href":"https://api.github.com/repos/exodev/social/issues/55"},"comments":{"href":"https://api.github.com/repos/exodev/social/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/exodev/social/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/exodev/social/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/exodev/social/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/exodev/social/statuses/cab1ac0e54f6392ba68cbb10b6f52dda5537d487"}}}}