{"action":"created","issue":{"url":"https://api.github.com/repos/contao-community-alliance/dc-general/issues/134","labels_url":"https://api.github.com/repos/contao-community-alliance/dc-general/issues/134/labels{/name}","comments_url":"https://api.github.com/repos/contao-community-alliance/dc-general/issues/134/comments","events_url":"https://api.github.com/repos/contao-community-alliance/dc-general/issues/134/events","html_url":"https://github.com/contao-community-alliance/dc-general/pull/134","id":91767238,"number":134,"title":"Copy without manual sorting","user":{"login":"dmolineus","id":1186266,"avatar_url":"https://avatars.githubusercontent.com/u/1186266?v=3","gravatar_id":"","url":"https://api.github.com/users/dmolineus","html_url":"https://github.com/dmolineus","followers_url":"https://api.github.com/users/dmolineus/followers","following_url":"https://api.github.com/users/dmolineus/following{/other_user}","gists_url":"https://api.github.com/users/dmolineus/gists{/gist_id}","starred_url":"https://api.github.com/users/dmolineus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmolineus/subscriptions","organizations_url":"https://api.github.com/users/dmolineus/orgs","repos_url":"https://api.github.com/users/dmolineus/repos","events_url":"https://api.github.com/users/dmolineus/events{/privacy}","received_events_url":"https://api.github.com/users/dmolineus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-29T10:27:53Z","updated_at":"2015-06-29T16:29:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/contao-community-alliance/dc-general/pulls/134","html_url":"https://github.com/contao-community-alliance/dc-general/pull/134","diff_url":"https://github.com/contao-community-alliance/dc-general/pull/134.diff","patch_url":"https://github.com/contao-community-alliance/dc-general/pull/134.patch"},"body":"This pull requests fixes the copy of an item when no sorting property is used (See metamodels/core#743).\r\n\r\n* It moves the base config sorting initialization to the `BackendViewPopulator` as the base config sorting is a base requirement for many cases. Here it's required to detect non manual sorting property in the ClipboardController. Afaik there's no case where it would cause an unexpected behaviour. Do you know any edge cases,  @discordier?\r\n* It prevents the clipboard to handle such copy actions.\r\n* It uses the still existing View::copy methods instead if no manual sorting property is used.\r\n\r\nThere is still an issue: \r\n * If there is a manual sorting property which is not used in the current view, it would be duplicated. So the same sorting value would exists. Can this break the manual sorting or is this \"fixed\" by the next sorting operation? I could not detect an unexpected behaviour but did not know all edge cases."},"comment":{"url":"https://api.github.com/repos/contao-community-alliance/dc-general/issues/comments/116750703","html_url":"https://github.com/contao-community-alliance/dc-general/pull/134#issuecomment-116750703","issue_url":"https://api.github.com/repos/contao-community-alliance/dc-general/issues/134","id":116750703,"user":{"login":"discordier","id":940331,"avatar_url":"https://avatars.githubusercontent.com/u/940331?v=3","gravatar_id":"","url":"https://api.github.com/users/discordier","html_url":"https://github.com/discordier","followers_url":"https://api.github.com/users/discordier/followers","following_url":"https://api.github.com/users/discordier/following{/other_user}","gists_url":"https://api.github.com/users/discordier/gists{/gist_id}","starred_url":"https://api.github.com/users/discordier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/discordier/subscriptions","organizations_url":"https://api.github.com/users/discordier/orgs","repos_url":"https://api.github.com/users/discordier/repos","events_url":"https://api.github.com/users/discordier/events{/privacy}","received_events_url":"https://api.github.com/users/discordier/received_events","type":"User","site_admin":false},"created_at":"2015-06-29T16:29:30Z","updated_at":"2015-06-29T16:29:30Z","body":"You are right, when someone is defining more than one manual sorting definitions, the system will break. However this is a real cumbersome edgecase (at the time being) and could only be implemented by looping over all sortings, refetch the collection and move the item right behind the desired previous element (of course this has to be done after the models have been stored in the DB).\r\nHowever I think this edge case can be left out of implementation for the moment, as hopefully noone will try to configure it. In the end, they can still resort the elements later on (the sorting value will default to 0 and therefore keep the elements \"on top\"). It will require a certain amount of moving items around but still it is possible to \"resort\" the elements."}}