Defect #32656
closedDrag and drop objects from Outlook to Redmine deletes the objects
0%
Description
There is a issue: why when we drag and drop the letters from outlook to the attachements, the letter (from example from inbox) is deleted.
for example, when we drag and drop any file from explorer, this file is not deleted, it is copied to the attachments to redmine.
also when we drag and drop files from outlook to any folder in explorer, the attachments also are not deleted from outlook.
Will be pleased for promt reply.
Files
Updated by Go MAEDA almost 5 years ago
Do you mean that emails or attachments are deleted from the inbox of Outlook when you drag and drop emails or files to Redmine?
I think Redmine cannot do anything about it because Redmine just receives dropped things and cannot control the drag source and its data. Probably emails or attachments are deleted by Outlook, not Redmine.
Updated by Andrey Sergeev almost 5 years ago
yes, that's right.
for example when i drag and drop emails to my desktop , they are not deleted from outlook, they copied.
I think it is failure, and i would like to know how it could be fixed.
I think the problem is in Redmine. What are preventions can be made to solve this issue?
Thanks in advance.
Updated by Guillermo ML almost 5 years ago
- Drag drop from MS Outlook to Chrome remove file
- Drag and drop WORKS. However, deletes email. Can we fix?
Could be that JQuery's upload module has bad behavior when _dropEffect_ is not set? (see the second link for a posible solution)
Updated by Andrey Sergeev almost 5 years ago
Yes, but i'm not a web-developer. I have users, that have faced with such problem. I don't know where i can use this script (just apply it to google chrome?)
If it can be turned off (JQuery script in google chrome) would appreciate for help.
Updated by Yuichi HARADA almost 5 years ago
Set "copy" to dropEffect
in the following patch. However, I don't own Outlook, so please check this patch, someone.
diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js
index dd7a8e30e..39315d8f8 100644
--- a/public/javascripts/attachments.js
+++ b/public/javascripts/attachments.js
@@ -185,6 +185,7 @@ handleFileDropEvent.target = '';
function dragOverHandler(e) {
$(this).addClass('fileover');
blockEventPropagation(e);
+ e.dataTransfer.dropEffect = 'copy';
}
function dragOutHandler(e) {
@@ -195,6 +196,7 @@ function dragOutHandler(e) {
function setupFileDrop() {
if (window.File && window.FileList && window.ProgressEvent && window.FormData) {
+ $.event.fixHooks.dragover = { props: [ 'dataTransfer' ] };
$.event.fixHooks.drop = { props: [ 'dataTransfer' ] };
$('form div.box:not(.filedroplistner)').has('input:file.filedrop').each(function() {
Updated by Simon Hori almost 5 years ago
Thanks for the patch! I believe I added the two lines properly to the js but unfortunately it is still deleting the item from my Outlook and this error is logged when mouse over to the drop area.
attachments.js?1580264756:193 Uncaught TypeError: Cannot set property 'dropEffect' of undefined at HTMLDivElement.dragOutHandler (attachments.js?1580264756:193) at HTMLDivElement.dispatch (jquery-1.11.1-ui-1.11.0-ujs-3.1.4.js?1571477570:3) at HTMLDivElement.r.handle (jquery-1.11.1-ui-1.11.0-ujs-3.1.4.js?1571477570:3)
Updated by Yuichi HARADA almost 5 years ago
- File 32656-drop-effect.patch 32656-drop-effect.patch added
Simon Hori wrote:
Thanks for the patch! I believe I added the two lines properly to the js but unfortunately it is still deleting the item from my Outlook and this error is logged when mouse over to the drop area.
attachments.js?1580264756:193 Uncaught TypeError: Cannot set property 'dropEffect' of undefined at HTMLDivElement.dragOutHandler (attachments.js?1580264756:193)
Thank you for confirming the patch. It looks like the patch has been applied to a different line. Is the patch applied properly?
I attached a patch (same as #32656-5).
Updated by Simon Hori almost 5 years ago
Sorry, you are right. I changed a wrong line in `dragOutHandler` but it must be added to `dragOverHandler` as you wrote.
Now it works perfectly fine with my MS Outlook!!
No deletion occurred after a drag-drop. Thank you.
I hope this fix is included in the next version.
FYI: I confirmed with Redmine 3.4.12, MS Outlook 2010 and Chrome 79.0.3945.130 on Windows 10.
Updated by Go MAEDA almost 5 years ago
- Subject changed from Drag and drop letters from outlook to attachments redmine to Drag and drop objects from Outlook to Redmine deletes the objects
- Target version set to 4.0.7
Simon Hori wrote:
Now it works perfectly fine with my MS Outlook!!
No deletion occurred after a drag-drop. Thank you.
Thank you for the test result. Setting the target version to 4.0.7.
Updated by Cédric Berger almost 5 years ago
I've Redmine 4 customers who find the actual behaviour very convenient:
When they drag an e-mail from Outlook to Redmine, the e-mail disappear from Outlook, while is actually what they want, because the e-mail has been "processed" and should disappear from the Inbox.
Is there a way to keep both behaviour optional?
Cédric
Updated by Cédric Berger almost 5 years ago
Maybe if the shift key is maintained during the drag+drop, the original email is deleted, or something like that?
Updated by Matthias Kastner over 4 years ago
Cédric Berger wrote:
Maybe if the shift key is maintained during the drag+drop, the original email is deleted, or something like that?
Any automatic deletion is actually unwanted behaviour for most users. Regardless of the key stroke combination pattern. If the user wants to delete an Email from his inbox, he should always do that manually by using outlook‘s native delete functionality or hit [DEL]
Updated by Go MAEDA over 4 years ago
- Status changed from New to Resolved
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed the patch. Thank you for your contribution.