{"action":"closed","issue":{"url":"https://api.github.com/repos/cuba-platform/cuba/issues/1660","repository_url":"https://api.github.com/repos/cuba-platform/cuba","labels_url":"https://api.github.com/repos/cuba-platform/cuba/issues/1660/labels{/name}","comments_url":"https://api.github.com/repos/cuba-platform/cuba/issues/1660/comments","events_url":"https://api.github.com/repos/cuba-platform/cuba/issues/1660/events","html_url":"https://github.com/cuba-platform/cuba/issues/1660","id":389313901,"node_id":"MDU6SXNzdWUzODkzMTM5MDE=","number":1660,"title":"Initial import of security groups creates duplicate GroupHierarchy records","user":{"login":"gorbunkov","id":7888486,"node_id":"MDQ6VXNlcjc4ODg0ODY=","avatar_url":"https://avatars3.githubusercontent.com/u/7888486?v=4","gravatar_id":"","url":"https://api.github.com/users/gorbunkov","html_url":"https://github.com/gorbunkov","followers_url":"https://api.github.com/users/gorbunkov/followers","following_url":"https://api.github.com/users/gorbunkov/following{/other_user}","gists_url":"https://api.github.com/users/gorbunkov/gists{/gist_id}","starred_url":"https://api.github.com/users/gorbunkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gorbunkov/subscriptions","organizations_url":"https://api.github.com/users/gorbunkov/orgs","repos_url":"https://api.github.com/users/gorbunkov/repos","events_url":"https://api.github.com/users/gorbunkov/events{/privacy}","received_events_url":"https://api.github.com/users/gorbunkov/received_events","type":"User","site_admin":false},"labels":[{"id":916140696,"node_id":"MDU6TGFiZWw5MTYxNDA2OTY=","url":"https://api.github.com/repos/cuba-platform/cuba/labels/state:%20fixed","name":"state: fixed","color":"cfffad","default":false},{"id":1136518115,"node_id":"MDU6TGFiZWwxMTM2NTE4MTE1","url":"https://api.github.com/repos/cuba-platform/cuba/labels/ver:%206.10.5","name":"ver: 6.10.5","color":"eeeeee","default":false},{"id":950398940,"node_id":"MDU6TGFiZWw5NTAzOTg5NDA=","url":"https://api.github.com/repos/cuba-platform/cuba/labels/ver:%207.0.0","name":"ver: 7.0.0","color":"eeeeee","default":false}],"state":"closed","locked":false,"assignee":{"login":"gorbunkov","id":7888486,"node_id":"MDQ6VXNlcjc4ODg0ODY=","avatar_url":"https://avatars3.githubusercontent.com/u/7888486?v=4","gravatar_id":"","url":"https://api.github.com/users/gorbunkov","html_url":"https://github.com/gorbunkov","followers_url":"https://api.github.com/users/gorbunkov/followers","following_url":"https://api.github.com/users/gorbunkov/following{/other_user}","gists_url":"https://api.github.com/users/gorbunkov/gists{/gist_id}","starred_url":"https://api.github.com/users/gorbunkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gorbunkov/subscriptions","organizations_url":"https://api.github.com/users/gorbunkov/orgs","repos_url":"https://api.github.com/users/gorbunkov/repos","events_url":"https://api.github.com/users/gorbunkov/events{/privacy}","received_events_url":"https://api.github.com/users/gorbunkov/received_events","type":"User","site_admin":false},"assignees":[{"login":"gorbunkov","id":7888486,"node_id":"MDQ6VXNlcjc4ODg0ODY=","avatar_url":"https://avatars3.githubusercontent.com/u/7888486?v=4","gravatar_id":"","url":"https://api.github.com/users/gorbunkov","html_url":"https://github.com/gorbunkov","followers_url":"https://api.github.com/users/gorbunkov/followers","following_url":"https://api.github.com/users/gorbunkov/following{/other_user}","gists_url":"https://api.github.com/users/gorbunkov/gists{/gist_id}","starred_url":"https://api.github.com/users/gorbunkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gorbunkov/subscriptions","organizations_url":"https://api.github.com/users/gorbunkov/orgs","repos_url":"https://api.github.com/users/gorbunkov/repos","events_url":"https://api.github.com/users/gorbunkov/events{/privacy}","received_events_url":"https://api.github.com/users/gorbunkov/received_events","type":"User","site_admin":false},{"login":"natfirst","id":17950251,"node_id":"MDQ6VXNlcjE3OTUwMjUx","avatar_url":"https://avatars3.githubusercontent.com/u/17950251?v=4","gravatar_id":"","url":"https://api.github.com/users/natfirst","html_url":"https://github.com/natfirst","followers_url":"https://api.github.com/users/natfirst/followers","following_url":"https://api.github.com/users/natfirst/following{/other_user}","gists_url":"https://api.github.com/users/natfirst/gists{/gist_id}","starred_url":"https://api.github.com/users/natfirst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natfirst/subscriptions","organizations_url":"https://api.github.com/users/natfirst/orgs","repos_url":"https://api.github.com/users/natfirst/repos","events_url":"https://api.github.com/users/natfirst/events{/privacy}","received_events_url":"https://api.github.com/users/natfirst/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/cuba-platform/cuba/milestones/12","html_url":"https://github.com/cuba-platform/cuba/milestone/12","labels_url":"https://api.github.com/repos/cuba-platform/cuba/milestones/12/labels","id":3304855,"node_id":"MDk6TWlsZXN0b25lMzMwNDg1NQ==","number":12,"title":"Release 6.10","description":"","creator":{"login":"knstvk","id":5513878,"node_id":"MDQ6VXNlcjU1MTM4Nzg=","avatar_url":"https://avatars3.githubusercontent.com/u/5513878?v=4","gravatar_id":"","url":"https://api.github.com/users/knstvk","html_url":"https://github.com/knstvk","followers_url":"https://api.github.com/users/knstvk/followers","following_url":"https://api.github.com/users/knstvk/following{/other_user}","gists_url":"https://api.github.com/users/knstvk/gists{/gist_id}","starred_url":"https://api.github.com/users/knstvk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knstvk/subscriptions","organizations_url":"https://api.github.com/users/knstvk/orgs","repos_url":"https://api.github.com/users/knstvk/repos","events_url":"https://api.github.com/users/knstvk/events{/privacy}","received_events_url":"https://api.github.com/users/knstvk/received_events","type":"User","site_admin":false},"open_issues":42,"closed_issues":134,"state":"open","created_at":"2018-04-27T18:00:01Z","updated_at":"2018-12-11T12:43:19Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2018-12-10T13:59:56Z","updated_at":"2018-12-11T12:43:18Z","closed_at":"2018-12-11T12:43:18Z","author_association":"CONTRIBUTOR","body":"When security groups are imported from JSON on empty database, duplicated GroupHierarchy records are created. This happens because default export to JSON serializes hierarchyList collection. When doing the import, this collection is restored from the JSON, but also duplicate GroupHierarchy records are created by the `GroupEntityListener` class. These duplicate records cause multiple apply of the same security constraints.\r\nThe solution is not to export the hierarchyList property when doing the roles export and do not process it on import. Group hierarchies will be created by the entity listener.\r\n\r\nForum topic: https://www.cuba-platform.ru/discuss/t/pri-importe-grupp-dostupa-usloviya-po-join-dubliruyutsya-pervoe-vstrechennoe-uslovie-v-from-dubliruetsya-2-raza/2461/2\r\n\r\nAs a workaround, users may import the groups.json file twice - the second (update) operation will remove unnecessary GroupHierarchy records."}}
{"actor":{"display_login":"natfirst"}}