Closed Bug 1571433 Opened 5 years ago Closed 5 years ago

Cannot delete/detach attachment in saved message (eml) - should disable corresponding menu items

Categories

(Thunderbird :: Message Reader UI, defect)

x86_64
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 72.0

People

(Reporter: peer.griebel, Assigned: aceman)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Steps to reproduce:

Save an e-mail with attachment to a local file.
Open it.
Delete attachment from e-mail.

Actual results:

Nothing happens. The attachment is not deleted.

Expected results:

E-Mail should be modified. The attachment should be deleted. The message should be considered as being modified. When saved the resulting eml file should be smaller than before.

What is the extension of the local file? All emails have the .eml extension as far as I know.

Open it with what application, Thunderbird?

Testing one I saved as an .eml file.
Going to the saved file in my file manager and opening it in Thunderbird.
It opens in an email window.
Selecting Delete from the Attachment bar gives me a Confirm dialog.
Clicking "OK" does not delete the attachment.

Selecting the same message in Thunderbird, if I right-click, select "Open Message in New Tab" or "Open Message in New Window".
Open the message.
Go to delete the attachment and both "Detach" and "Delete" are disabled.

It appears to me that even though they both look enabled in the previous method, they are actually disabled and working correctly.

Component: Untriaged → Message Reader UI
Flags: needinfo?(peer.griebel)
OS: Unspecified → All
Hardware: Unspecified → x86_64

Magnus, what are we going to do with this? WONTFIX?

When deleting an attachment in a folder, TB creates a new message without the attachment and marks the original one as deleted. Messages are never modified. If you save a message to disk in an .eml file we should disable any functions that delete or detach attachments.

Walt, I don't understand:

Go to delete the attachment and both "Detach" and "Delete" are disabled.
It appears to me that even though they both look enabled in the previous method, they are actually disabled and working correctly.

Disabled and working? This bug is about a saved message.

Flags: needinfo?(wls220spring)
Summary: Cannot delete attachment in saved message (eml) → Cannot delete/detach attachment in saved message (eml) - should disable corresponding menu items

(In reply to Jorg K (GMT+2) from comment #2)

Walt, I don't understand:

Go to delete the attachment and both "Detach" and "Delete" are disabled.
It appears to me that even though they both look enabled in the previous method, they are actually disabled and working correctly.

Disabled and working? This bug is about a saved message.

When you open a message with an attachment in a new tab or new window within Thunderbird both "Detach" and "Delete" are disabled.

If you save the same message, open it from the file manager, the message opens in a new window.
That message will have "Detach" and "Delete" appear enabled.
Selecting "Delete" does bring up the Confirm dialog, but it doesn't delete the attachment, so apparently even though the Confirm dialog comes up the selections are disabled and working as if the message was opened in a new tab or window from within Thunderbird.

So when the saved message is opened, "Detach" and "Delete" should be disabled like they are when a message is opened in a new tab or window in Thunderbird so the Confirm dialog doesn't get triggered.

Flags: needinfo?(wls220spring)

(In reply to WaltS48 [:walts48] from comment #3)

When you open a message with an attachment in a new tab or new window within Thunderbird both "Detach" and "Delete" are disabled.

Really?? I hope not, that doesn't happen to me. Why would or should they be disabled? You want them enabled to operate on the attachments.

(In reply to Jorg K (GMT+2) from comment #4)

(In reply to WaltS48 [:walts48] from comment #3)

When you open a message with an attachment in a new tab or new window within Thunderbird both "Detach" and "Delete" are disabled.

Really?? I hope not, that doesn't happen to me. Why would or should they be disabled? You want them enabled to operate on the attachments.

I just sent myself a message with an attachment from one account to the other and they are not disabled when I open the message in a new tab or window. I don't know what happened with my previous test.

Tested with 69.0b2 and Daily 70.0a1 on Ubuntu 18.04.2.

Sorry for the confusion.

I just want to confirm that my bug is about a local file with extension .eml (as stated in subject).

And I want to confirm that I see the same reaction as stated in comment #2: If you save the same message, open it from the file manager, the message opens in a new window.
That message will have "Detach" and "Delete" appear enabled.
Selecting "Delete" does bring up the Confirm dialog, but it doesn't delete the attachment

So one way the handle the issue is to simply disable the buttons on saved messages.

But: We have the use case that we want to delete an attachment of a saved message. Since we can't unsave a message (i.e. get it back into IMAP storage) we can't use the delete functionality this way.

Flags: needinfo?(peer.griebel)

someone will need to decide which way to go - disable the function (which is easy to do) or decide we should allow it

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(mkmelin+mozilla)

Let's disable it for now. Would take a patch to enable + make it work but that's going to be far from trivial, and quite an edge case need.

Flags: needinfo?(mkmelin+mozilla)
Attached patch 1571433.patchSplinter Review

Disables "detach", "detach all", "delete" and "delete all" items in the attachment menu.

Assignee: nobody → acelists
Status: NEW → ASSIGNED
Attachment #9106005 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9106005 [details] [diff] [review]
1571433.patch

Review of attachment 9106005 [details] [diff] [review]:
-----------------------------------------------------------------

r=mkmelin
Attachment #9106005 - Flags: review?(mkmelin+mozilla) → review+

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/0f3fc12f7371
disable "detach attachment" menuitems when displaying an eml file. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

Please check linting before submitting a patch.

Target Milestone: --- → Thunderbird 72.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: