{"action":"closed","number":678,"pull_request":{"url":"https://api.github.com/repos/CESNET/perun/pulls/678","id":29011393,"html_url":"https://github.com/CESNET/perun/pull/678","diff_url":"https://github.com/CESNET/perun/pull/678.diff","patch_url":"https://github.com/CESNET/perun/pull/678.patch","issue_url":"https://api.github.com/repos/CESNET/perun/issues/678","number":678,"state":"closed","locked":false,"title":"CORE: Optimized checks for removeAttribute(s)","user":{"login":"zlamalp","id":1336607,"avatar_url":"https://avatars.githubusercontent.com/u/1336607?v=3","gravatar_id":"","url":"https://api.github.com/users/zlamalp","html_url":"https://github.com/zlamalp","followers_url":"https://api.github.com/users/zlamalp/followers","following_url":"https://api.github.com/users/zlamalp/following{/other_user}","gists_url":"https://api.github.com/users/zlamalp/gists{/gist_id}","starred_url":"https://api.github.com/users/zlamalp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zlamalp/subscriptions","organizations_url":"https://api.github.com/users/zlamalp/orgs","repos_url":"https://api.github.com/users/zlamalp/repos","events_url":"https://api.github.com/users/zlamalp/events{/privacy}","received_events_url":"https://api.github.com/users/zlamalp/received_events","type":"User","site_admin":false},"body":"- removeAttribute() in Impl now return true if value was really deleted from DB\r\n  or false when was not present in a first place.\r\n\r\n- removeAttributeWithoutCheck() in Bl takes such value from Impl and performs\r\n  changedAttributeHook and stores auditer message only if value was actually changed.\r\n\r\n- removeAttribute() in Bl uses above method and perform checkAttributeValue and\r\n  checkAttributeDependency only when value was changed. In some cases (methods\r\n  used by virt attr modules) this method also return changed state. Most of them\r\n  still return void since we don't need such information in bl/entry layer.\r\n\r\n- removeVirtualAttribute() for resource, user_facility and group now return boolean\r\n  if value was really deleted or not. Default implementation returns false. Modules\r\n  return proper value. Removed implementation for u_f_UID and u_f_login since they\r\n  didn't do anything => return false as abstract method.\r\n\r\n- Fixed (0 > jdbc.update()) to (0 < jdbc.update()) when removing attribute\r\n  for VO and Group. It previously prevent log message about removing attribute\r\n  from being logged. Now it's logged and returns proper state.\r\n\r\n- removeAttributes() now performs checkAttributesValue and checkAttributesDependencies\r\n  only on modified (deleted) attributes. Core attributes are now excluded, since they\r\n  can't be changed that way.\r\n\r\n- Methods removeAllAttributes() are untouched, since they actually delete only\r\n  attributes with some values, hence they hook/check/dependency on all of them.\r\n\r\n- Above implementation should perform less unnecessary checks for attr values\r\n  as well as to prevent unnecessary auditer messages from being stored\r\n  (\"attribute was removed\" even if it was already null).","created_at":"2015-02-10T14:35:57Z","updated_at":"2015-02-11T08:59:04Z","closed_at":"2015-02-11T08:59:04Z","merged_at":"2015-02-11T08:59:04Z","merge_commit_sha":"1e13278894784e7f51bad7dfa27f061acdde9b0c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CESNET/perun/pulls/678/commits","review_comments_url":"https://api.github.com/repos/CESNET/perun/pulls/678/comments","review_comment_url":"https://api.github.com/repos/CESNET/perun/pulls/comments/{number}","comments_url":"https://api.github.com/repos/CESNET/perun/issues/678/comments","statuses_url":"https://api.github.com/repos/CESNET/perun/statuses/e5742b19063306c28964ac460abe4b2d3b0f0c5c","head":{"label":"zlamalp:removeAttribute","ref":"removeAttribute","sha":"e5742b19063306c28964ac460abe4b2d3b0f0c5c","user":{"login":"zlamalp","id":1336607,"avatar_url":"https://avatars.githubusercontent.com/u/1336607?v=3","gravatar_id":"","url":"https://api.github.com/users/zlamalp","html_url":"https://github.com/zlamalp","followers_url":"https://api.github.com/users/zlamalp/followers","following_url":"https://api.github.com/users/zlamalp/following{/other_user}","gists_url":"https://api.github.com/users/zlamalp/gists{/gist_id}","starred_url":"https://api.github.com/users/zlamalp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zlamalp/subscriptions","organizations_url":"https://api.github.com/users/zlamalp/orgs","repos_url":"https://api.github.com/users/zlamalp/repos","events_url":"https://api.github.com/users/zlamalp/events{/privacy}","received_events_url":"https://api.github.com/users/zlamalp/received_events","type":"User","site_admin":false},"repo":{"id":13830293,"name":"perun","full_name":"zlamalp/perun","owner":{"login":"zlamalp","id":1336607,"avatar_url":"https://avatars.githubusercontent.com/u/1336607?v=3","gravatar_id":"","url":"https://api.github.com/users/zlamalp","html_url":"https://github.com/zlamalp","followers_url":"https://api.github.com/users/zlamalp/followers","following_url":"https://api.github.com/users/zlamalp/following{/other_user}","gists_url":"https://api.github.com/users/zlamalp/gists{/gist_id}","starred_url":"https://api.github.com/users/zlamalp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zlamalp/subscriptions","organizations_url":"https://api.github.com/users/zlamalp/orgs","repos_url":"https://api.github.com/users/zlamalp/repos","events_url":"https://api.github.com/users/zlamalp/events{/privacy}","received_events_url":"https://api.github.com/users/zlamalp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zlamalp/perun","description":"Identity and Access Management System","fork":true,"url":"https://api.github.com/repos/zlamalp/perun","forks_url":"https://api.github.com/repos/zlamalp/perun/forks","keys_url":"https://api.github.com/repos/zlamalp/perun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zlamalp/perun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zlamalp/perun/teams","hooks_url":"https://api.github.com/repos/zlamalp/perun/hooks","issue_events_url":"https://api.github.com/repos/zlamalp/perun/issues/events{/number}","events_url":"https://api.github.com/repos/zlamalp/perun/events","assignees_url":"https://api.github.com/repos/zlamalp/perun/assignees{/user}","branches_url":"https://api.github.com/repos/zlamalp/perun/branches{/branch}","tags_url":"https://api.github.com/repos/zlamalp/perun/tags","blobs_url":"https://api.github.com/repos/zlamalp/perun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zlamalp/perun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zlamalp/perun/git/refs{/sha}","trees_url":"https://api.github.com/repos/zlamalp/perun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zlamalp/perun/statuses/{sha}","languages_url":"https://api.github.com/repos/zlamalp/perun/languages","stargazers_url":"https://api.github.com/repos/zlamalp/perun/stargazers","contributors_url":"https://api.github.com/repos/zlamalp/perun/contributors","subscribers_url":"https://api.github.com/repos/zlamalp/perun/subscribers","subscription_url":"https://api.github.com/repos/zlamalp/perun/subscription","commits_url":"https://api.github.com/repos/zlamalp/perun/commits{/sha}","git_commits_url":"https://api.github.com/repos/zlamalp/perun/git/commits{/sha}","comments_url":"https://api.github.com/repos/zlamalp/perun/comments{/number}","issue_comment_url":"https://api.github.com/repos/zlamalp/perun/issues/comments/{number}","contents_url":"https://api.github.com/repos/zlamalp/perun/contents/{+path}","compare_url":"https://api.github.com/repos/zlamalp/perun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zlamalp/perun/merges","archive_url":"https://api.github.com/repos/zlamalp/perun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zlamalp/perun/downloads","issues_url":"https://api.github.com/repos/zlamalp/perun/issues{/number}","pulls_url":"https://api.github.com/repos/zlamalp/perun/pulls{/number}","milestones_url":"https://api.github.com/repos/zlamalp/perun/milestones{/number}","notifications_url":"https://api.github.com/repos/zlamalp/perun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zlamalp/perun/labels{/name}","releases_url":"https://api.github.com/repos/zlamalp/perun/releases{/id}","created_at":"2013-10-24T11:29:23Z","updated_at":"2015-02-11T08:53:58Z","pushed_at":"2015-02-11T08:54:29Z","git_url":"git://github.com/zlamalp/perun.git","ssh_url":"git@github.com:zlamalp/perun.git","clone_url":"https://github.com/zlamalp/perun.git","svn_url":"https://github.com/zlamalp/perun","homepage":"http://perun.cesnet.cz/web/","size":27651,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"CESNET:master","ref":"master","sha":"0afa8def58111c743e7bfc9558bab6512db7b4bf","user":{"login":"CESNET","id":1116469,"avatar_url":"https://avatars.githubusercontent.com/u/1116469?v=3","gravatar_id":"","url":"https://api.github.com/users/CESNET","html_url":"https://github.com/CESNET","followers_url":"https://api.github.com/users/CESNET/followers","following_url":"https://api.github.com/users/CESNET/following{/other_user}","gists_url":"https://api.github.com/users/CESNET/gists{/gist_id}","starred_url":"https://api.github.com/users/CESNET/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CESNET/subscriptions","organizations_url":"https://api.github.com/users/CESNET/orgs","repos_url":"https://api.github.com/users/CESNET/repos","events_url":"https://api.github.com/users/CESNET/events{/privacy}","received_events_url":"https://api.github.com/users/CESNET/received_events","type":"Organization","site_admin":false},"repo":{"id":4085998,"name":"perun","full_name":"CESNET/perun","owner":{"login":"CESNET","id":1116469,"avatar_url":"https://avatars.githubusercontent.com/u/1116469?v=3","gravatar_id":"","url":"https://api.github.com/users/CESNET","html_url":"https://github.com/CESNET","followers_url":"https://api.github.com/users/CESNET/followers","following_url":"https://api.github.com/users/CESNET/following{/other_user}","gists_url":"https://api.github.com/users/CESNET/gists{/gist_id}","starred_url":"https://api.github.com/users/CESNET/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CESNET/subscriptions","organizations_url":"https://api.github.com/users/CESNET/orgs","repos_url":"https://api.github.com/users/CESNET/repos","events_url":"https://api.github.com/users/CESNET/events{/privacy}","received_events_url":"https://api.github.com/users/CESNET/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CESNET/perun","description":"Identity and Access Management System","fork":false,"url":"https://api.github.com/repos/CESNET/perun","forks_url":"https://api.github.com/repos/CESNET/perun/forks","keys_url":"https://api.github.com/repos/CESNET/perun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CESNET/perun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CESNET/perun/teams","hooks_url":"https://api.github.com/repos/CESNET/perun/hooks","issue_events_url":"https://api.github.com/repos/CESNET/perun/issues/events{/number}","events_url":"https://api.github.com/repos/CESNET/perun/events","assignees_url":"https://api.github.com/repos/CESNET/perun/assignees{/user}","branches_url":"https://api.github.com/repos/CESNET/perun/branches{/branch}","tags_url":"https://api.github.com/repos/CESNET/perun/tags","blobs_url":"https://api.github.com/repos/CESNET/perun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CESNET/perun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CESNET/perun/git/refs{/sha}","trees_url":"https://api.github.com/repos/CESNET/perun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CESNET/perun/statuses/{sha}","languages_url":"https://api.github.com/repos/CESNET/perun/languages","stargazers_url":"https://api.github.com/repos/CESNET/perun/stargazers","contributors_url":"https://api.github.com/repos/CESNET/perun/contributors","subscribers_url":"https://api.github.com/repos/CESNET/perun/subscribers","subscription_url":"https://api.github.com/repos/CESNET/perun/subscription","commits_url":"https://api.github.com/repos/CESNET/perun/commits{/sha}","git_commits_url":"https://api.github.com/repos/CESNET/perun/git/commits{/sha}","comments_url":"https://api.github.com/repos/CESNET/perun/comments{/number}","issue_comment_url":"https://api.github.com/repos/CESNET/perun/issues/comments/{number}","contents_url":"https://api.github.com/repos/CESNET/perun/contents/{+path}","compare_url":"https://api.github.com/repos/CESNET/perun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CESNET/perun/merges","archive_url":"https://api.github.com/repos/CESNET/perun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CESNET/perun/downloads","issues_url":"https://api.github.com/repos/CESNET/perun/issues{/number}","pulls_url":"https://api.github.com/repos/CESNET/perun/pulls{/number}","milestones_url":"https://api.github.com/repos/CESNET/perun/milestones{/number}","notifications_url":"https://api.github.com/repos/CESNET/perun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CESNET/perun/labels{/name}","releases_url":"https://api.github.com/repos/CESNET/perun/releases{/id}","created_at":"2012-04-20T11:55:38Z","updated_at":"2015-02-11T08:57:52Z","pushed_at":"2015-02-11T08:59:04Z","git_url":"git://github.com/CESNET/perun.git","ssh_url":"git@github.com:CESNET/perun.git","clone_url":"https://github.com/CESNET/perun.git","svn_url":"https://github.com/CESNET/perun","homepage":"http://perun.cesnet.cz","size":27456,"stargazers_count":9,"watchers_count":9,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":5,"forks":19,"open_issues":5,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CESNET/perun/pulls/678"},"html":{"href":"https://github.com/CESNET/perun/pull/678"},"issue":{"href":"https://api.github.com/repos/CESNET/perun/issues/678"},"comments":{"href":"https://api.github.com/repos/CESNET/perun/issues/678/comments"},"review_comments":{"href":"https://api.github.com/repos/CESNET/perun/pulls/678/comments"},"review_comment":{"href":"https://api.github.com/repos/CESNET/perun/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/CESNET/perun/pulls/678/commits"},"statuses":{"href":"https://api.github.com/repos/CESNET/perun/statuses/e5742b19063306c28964ac460abe4b2d3b0f0c5c"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"licehammer","id":3735955,"avatar_url":"https://avatars.githubusercontent.com/u/3735955?v=3","gravatar_id":"","url":"https://api.github.com/users/licehammer","html_url":"https://github.com/licehammer","followers_url":"https://api.github.com/users/licehammer/followers","following_url":"https://api.github.com/users/licehammer/following{/other_user}","gists_url":"https://api.github.com/users/licehammer/gists{/gist_id}","starred_url":"https://api.github.com/users/licehammer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/licehammer/subscriptions","organizations_url":"https://api.github.com/users/licehammer/orgs","repos_url":"https://api.github.com/users/licehammer/repos","events_url":"https://api.github.com/users/licehammer/events{/privacy}","received_events_url":"https://api.github.com/users/licehammer/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":414,"deletions":316,"changed_files":17}}