{"action":"created","issue":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1558","labels_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1558/labels{/name}","comments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1558/comments","events_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1558/events","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1558","id":126732034,"number":1558,"title":"Fix EZP-25366: relation fields aren't copied correctly","user":{"login":"bdunogier","id":235928,"avatar_url":"https://avatars.githubusercontent.com/u/235928?v=3","gravatar_id":"","url":"https://api.github.com/users/bdunogier","html_url":"https://github.com/bdunogier","followers_url":"https://api.github.com/users/bdunogier/followers","following_url":"https://api.github.com/users/bdunogier/following{/other_user}","gists_url":"https://api.github.com/users/bdunogier/gists{/gist_id}","starred_url":"https://api.github.com/users/bdunogier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdunogier/subscriptions","organizations_url":"https://api.github.com/users/bdunogier/orgs","repos_url":"https://api.github.com/users/bdunogier/repos","events_url":"https://api.github.com/users/bdunogier/events{/privacy}","received_events_url":"https://api.github.com/users/bdunogier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"andrerom","id":289757,"avatar_url":"https://avatars.githubusercontent.com/u/289757?v=3","gravatar_id":"","url":"https://api.github.com/users/andrerom","html_url":"https://github.com/andrerom","followers_url":"https://api.github.com/users/andrerom/followers","following_url":"https://api.github.com/users/andrerom/following{/other_user}","gists_url":"https://api.github.com/users/andrerom/gists{/gist_id}","starred_url":"https://api.github.com/users/andrerom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrerom/subscriptions","organizations_url":"https://api.github.com/users/andrerom/orgs","repos_url":"https://api.github.com/users/andrerom/repos","events_url":"https://api.github.com/users/andrerom/events{/privacy}","received_events_url":"https://api.github.com/users/andrerom/received_events","type":"User","site_admin":false},"milestone":null,"comments":11,"created_at":"2016-01-14T19:42:23Z","updated_at":"2016-01-28T08:43:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1558","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1558","diff_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1558.diff","patch_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1558.patch"},"body":"> Fixes http://jira.ez.no/browse/EZP-25366\r\n\r\nWhen copying content with relation fields, relations on the copy were not properly registered. This is fixed by applying the same logic used in createContent() and updateContent(): relations inside fields are recorded during copy, and registered using the persistence later at the end.\r\n\r\n### TODO\r\n- [x] Handle other versions\r\n- [x] Check if something must be done about existing relations\r\n- [x] Tests\r\n- [x] Add integration test for Content Copy\r\n- [x] Add integration test for Subtree Copy"},"comment":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/comments/176058773","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1558#issuecomment-176058773","issue_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1558","id":176058773,"user":{"login":"bdunogier","id":235928,"avatar_url":"https://avatars.githubusercontent.com/u/235928?v=3","gravatar_id":"","url":"https://api.github.com/users/bdunogier","html_url":"https://github.com/bdunogier","followers_url":"https://api.github.com/users/bdunogier/followers","following_url":"https://api.github.com/users/bdunogier/following{/other_user}","gists_url":"https://api.github.com/users/bdunogier/gists{/gist_id}","starred_url":"https://api.github.com/users/bdunogier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdunogier/subscriptions","organizations_url":"https://api.github.com/users/bdunogier/orgs","repos_url":"https://api.github.com/users/bdunogier/repos","events_url":"https://api.github.com/users/bdunogier/events{/privacy}","received_events_url":"https://api.github.com/users/bdunogier/received_events","type":"User","site_admin":false},"created_at":"2016-01-28T08:43:59Z","updated_at":"2016-01-28T08:43:59Z","body":">  RelationSearchMultivaluedBaseIntegrationTest, which given it was a duplicate of RelationSearchBaseIntegrationTest made me change them into 1 trait during last rebase\r\n\r\nYes, this is one part of tests where we have a big debt to pay."}}