{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/29561","repository_url":"https://api.github.com/repos/owncloud/core","labels_url":"https://api.github.com/repos/owncloud/core/issues/29561/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/29561/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/29561/events","html_url":"https://github.com/owncloud/core/issues/29561","id":273847362,"number":29561,"title":"Webdav COPY on new endpoint must trigger copy hooks","user":{"login":"PVince81","id":277525,"avatar_url":"https://avatars2.githubusercontent.com/u/277525?v=4","gravatar_id":"","url":"https://api.github.com/users/PVince81","html_url":"https://github.com/PVince81","followers_url":"https://api.github.com/users/PVince81/followers","following_url":"https://api.github.com/users/PVince81/following{/other_user}","gists_url":"https://api.github.com/users/PVince81/gists{/gist_id}","starred_url":"https://api.github.com/users/PVince81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PVince81/subscriptions","organizations_url":"https://api.github.com/users/PVince81/orgs","repos_url":"https://api.github.com/users/PVince81/repos","events_url":"https://api.github.com/users/PVince81/events{/privacy}","received_events_url":"https://api.github.com/users/PVince81/received_events","type":"User","site_admin":false},"labels":[{"id":12406434,"url":"https://api.github.com/repos/owncloud/core/labels/bug","name":"bug","color":"fc2929","default":true},{"id":89316535,"url":"https://api.github.com/repos/owncloud/core/labels/regression","name":"regression","color":"e11d21","default":false},{"id":751771728,"url":"https://api.github.com/repos/owncloud/core/labels/status/STALE","name":"status/STALE","color":"ededed","default":false}],"state":"open","locked":false,"assignee":{"login":"DeepDiver1975","id":1005065,"avatar_url":"https://avatars2.githubusercontent.com/u/1005065?v=4","gravatar_id":"","url":"https://api.github.com/users/DeepDiver1975","html_url":"https://github.com/DeepDiver1975","followers_url":"https://api.github.com/users/DeepDiver1975/followers","following_url":"https://api.github.com/users/DeepDiver1975/following{/other_user}","gists_url":"https://api.github.com/users/DeepDiver1975/gists{/gist_id}","starred_url":"https://api.github.com/users/DeepDiver1975/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeepDiver1975/subscriptions","organizations_url":"https://api.github.com/users/DeepDiver1975/orgs","repos_url":"https://api.github.com/users/DeepDiver1975/repos","events_url":"https://api.github.com/users/DeepDiver1975/events{/privacy}","received_events_url":"https://api.github.com/users/DeepDiver1975/received_events","type":"User","site_admin":false},"assignees":[{"login":"DeepDiver1975","id":1005065,"avatar_url":"https://avatars2.githubusercontent.com/u/1005065?v=4","gravatar_id":"","url":"https://api.github.com/users/DeepDiver1975","html_url":"https://github.com/DeepDiver1975","followers_url":"https://api.github.com/users/DeepDiver1975/followers","following_url":"https://api.github.com/users/DeepDiver1975/following{/other_user}","gists_url":"https://api.github.com/users/DeepDiver1975/gists{/gist_id}","starred_url":"https://api.github.com/users/DeepDiver1975/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeepDiver1975/subscriptions","organizations_url":"https://api.github.com/users/DeepDiver1975/orgs","repos_url":"https://api.github.com/users/DeepDiver1975/repos","events_url":"https://api.github.com/users/DeepDiver1975/events{/privacy}","received_events_url":"https://api.github.com/users/DeepDiver1975/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/119","html_url":"https://github.com/owncloud/core/milestone/119","labels_url":"https://api.github.com/repos/owncloud/core/milestones/119/labels","id":2827584,"number":119,"title":"development","description":"10.0.8","creator":{"login":"PVince81","id":277525,"avatar_url":"https://avatars2.githubusercontent.com/u/277525?v=4","gravatar_id":"","url":"https://api.github.com/users/PVince81","html_url":"https://github.com/PVince81","followers_url":"https://api.github.com/users/PVince81/followers","following_url":"https://api.github.com/users/PVince81/following{/other_user}","gists_url":"https://api.github.com/users/PVince81/gists{/gist_id}","starred_url":"https://api.github.com/users/PVince81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PVince81/subscriptions","organizations_url":"https://api.github.com/users/PVince81/orgs","repos_url":"https://api.github.com/users/PVince81/repos","events_url":"https://api.github.com/users/PVince81/events{/privacy}","received_events_url":"https://api.github.com/users/PVince81/received_events","type":"User","site_admin":false},"open_issues":105,"closed_issues":585,"state":"open","created_at":"2017-10-10T13:37:01Z","updated_at":"2018-04-03T10:03:16Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2017-11-14T16:04:59Z","updated_at":"2018-04-03T10:03:36Z","closed_at":null,"author_association":"OWNER","body":"### Steps\r\n\r\n1. Create file \"test.txt\"\r\n1. Breakpoint in $view->copy()\r\n1. Use Webdav COPY on new DAV endpoint to copy \"test.txt\" to a new file \"test2.txt\"\r\n\r\n### Expected result\r\n$view->copy() called, copy hooks triggered\r\n\r\n### Actual result\r\n$view->copy() not called at all.\r\n\r\n### Version\r\nv10.0.3\r\n\r\nIt is likely that the COPY operation is not rewired to use $view->copy() like the old DAV endpoint.\r\nThe move the new DAV endpoint has discarded these optimizations that were implemented in the tree level.\r\n\r\nThere are two possibilities:\r\n\r\n1) Bring back the copy handler on tree level (also see https://github.com/owncloud/core/pull/28853 and maybe wait for this one to merged first)\r\n\r\nor\r\n\r\n2) Find a way to trigger the copy hooks instead.\r\n\r\nBut I heard from @ahmedammar that it might already be firing a DELETE hook ?!\r\n\r\nSo it is possible that the code path is actually doing a DELETE + stream-copy replacement.\r\n\r\nThis reminds me of the code that @DeepDiver1975 had to bring in this PR to prevent this behavior for versions: https://github.com/owncloud/core/pull/29257/files#diff-b57f55de99d26900414647f6cd0de354R57.\r\n\r\n@DeepDiver1975 will the CopyPlugin also work for regular files ?\r\n"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/378197402","html_url":"https://github.com/owncloud/core/issues/29561#issuecomment-378197402","issue_url":"https://api.github.com/repos/owncloud/core/issues/29561","id":378197402,"user":{"login":"PVince81","id":277525,"avatar_url":"https://avatars2.githubusercontent.com/u/277525?v=4","gravatar_id":"","url":"https://api.github.com/users/PVince81","html_url":"https://github.com/PVince81","followers_url":"https://api.github.com/users/PVince81/followers","following_url":"https://api.github.com/users/PVince81/following{/other_user}","gists_url":"https://api.github.com/users/PVince81/gists{/gist_id}","starred_url":"https://api.github.com/users/PVince81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PVince81/subscriptions","organizations_url":"https://api.github.com/users/PVince81/orgs","repos_url":"https://api.github.com/users/PVince81/repos","events_url":"https://api.github.com/users/PVince81/events{/privacy}","received_events_url":"https://api.github.com/users/PVince81/received_events","type":"User","site_admin":false},"created_at":"2018-04-03T10:03:36Z","updated_at":"2018-04-03T10:03:36Z","author_association":"OWNER","body":"moving to planned"}}
{"actor":{"display_login":"PVince81"}}