プロジェクト

全般

プロフィール

Vote #80554

完了

Drag and drop objects from Outlook to Redmine deletes the objects

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Attachments_19
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
19
version_id:
159
issue_org_id:
32656
author_id:
343932
assigned_to_id:
332
comments:
15
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
139
ステータス-->[Closed]

説明

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.


journals

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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
The problem has been reported with other web based apps:
* "Drag drop from MS Outlook to Chrome remove file":https://support.google.com/chrome/thread/14094827?hl=en
* "Drag and drop WORKS. However, deletes email. Can we fix?":https://answers.microsoft.com/en-us/msoffice/forum/all/drag-and-drop-works-however-deletes-email-can-we/865f60c3-7980-4465-8a19-4d60b0ae5aba?rtAction=1575537469456&page=2

Could be that JQuery's upload module has bad behavior when "_dropEffect_":https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/dropEffect is not set? (see the second link for a posible solution)
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
Set "copy" to @dropEffect@ in the following patch. However, I don't own Outlook, so please check this patch, someone.

<pre><code class="diff">
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() {
</code></pre>
--------------------------------------------------------------------------------
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.

<pre>
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)
</pre>
--------------------------------------------------------------------------------
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.
>
> <pre>
attachments.js?1580264756:193 Uncaught TypeError: Cannot set property 'dropEffect' of undefined
at HTMLDivElement.dragOutHandler (attachments.js?1580264756:193)
</pre>

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).
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
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

--------------------------------------------------------------------------------
Maybe if the shift key is maintained during the drag+drop, the original email is deleted, or something like that?
--------------------------------------------------------------------------------
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]
--------------------------------------------------------------------------------
Committed the patch. Thank you for your contribution.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリAttachments_19 にセット
  • 対象バージョン4.0.7_159 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0