K-9: Add ability to discard changes and keep original draft

Created on 5 Apr 2017  路  6Comments  路  Source: k9mail/k-9

K-9 Mail deletes valuable emails from the Drafts folder, when you try to leave the editor without saving changes: either by saving them with missing attachment, or by removing them completely from the Drafts folder.

Expected behavior

When I open a previously drafted email in the k9 Mail Editor and I add some letters to this email, there must be an option to leave the editor without saving the changes.

Actual behavior

After pressing on "Discard" the unwished changes in the drafted email are either saved to the Drafts, or the email is completely removed from the drafts. I tested it with two different email servers: It happens with both.

Steps to reproduce

  1. Have an IMAP connection. With Firefox login to webmail and create a new testing email, upload a test file to its attachment, and save this email into your drafts folder.
  2. Now in K9mail 5.206 go to that drafts folder, refresh the folder (by polling), see the new testing email with paper clip symbol (indicating there is an attachment), and open your drafted testing email in the editing mode.
  3. Now you should see the first bug: In K9 Mail 5.206 the drafted email is opened in the editor WITHOUT any attachments.
  4. Now edit the text of this email, then try to cancel any change done to the email after you have noticed that the email had been loaded wrongly (namely without the attachments).
  5. To leave the editor, K9 Mail 5.206 gives you two options: either "Discard" or "Save as draft", but not "Discard changes" in order to leave the email as it was before.
  6. Since there is no clear option to discard the wrong changes, you might press on "Discard".
  7. Now watch in Firefox, what happened to the files in that drafts folder: Either that email still exists, but now without any attachments and with your edited text! Or this email is missing completely, because K9 5.206 has deleted of of it against my will.

Environment

K-9 Mail version: 5.206
Android version: 4.1.2
Account type (IMAP, POP3, WebDAV/Exchange): IMAP
I cannot upload a debug log, because the instruction (link below) is too complicated, because I have no data wire between my Mac and my android phone, and because the available descriptions - how to connect to my android device - apply only to Linux or Windows, but not Mac.
https://github.com/k9mail/k-9/wiki/LoggingErrors

enhancement

Most helpful comment

As I wrote in https://github.com/k9mail/k-9/issues/4372 to this issue: If you discard a draft (at least in this scenario/by this issue), K-9 jumps into the inbox (after deleting/discard a draft). I think K-9 should instead go back into the drafts folder!

All 6 comments

+1.

If i open a draft, and edit it, and then decide i want to keep the original draft and discard my new edits, i cannot do that! If i click "Discard changes", K9 does NOT simply discard changes-- it discards the original draft too.

Not expected behavior!

I discovered that missed drafted email in my "waste bin" folder. So I was lucky that my valuable email was still available.
But this severe bug - as @johnyradio and I described it - really needs to be corrected!

The problem still occurs.

As I wrote in https://github.com/k9mail/k-9/issues/4372 to this issue: If you discard a draft (at least in this scenario/by this issue), K-9 jumps into the inbox (after deleting/discard a draft). I think K-9 should instead go back into the drafts folder!

Dear developers, would you please mark this issue with another label?

..maybe something like "old bug" or "work security" ... thank you :)

I think this issue is "potential data lose" and therefor should get a high priority!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ByteHamster picture ByteHamster  路  3Comments

frederiiiic picture frederiiiic  路  3Comments

jimimaseye picture jimimaseye  路  3Comments

Kareem-Ahmed picture Kareem-Ahmed  路  3Comments

SpatMan05 picture SpatMan05  路  3Comments