Closed Bug 59694 Opened 24 years ago Closed 22 years ago

IMAP Mark as Deleted Mode: Need to use "Delete" button for toggle mark/unmark for "mark as deleted" msgs

Categories

(MailNews Core :: Networking: IMAP, defect, P2)

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.9

People

(Reporter: huang, Assigned: naving)

References

Details

Attachments

(1 file, 1 obsolete file)

11-08-01-MN6 build:

Overview:
From 4.x, Selecting "Delete" button on the tool bar will unmark "mark as delete"  
messages on the thread pane. Netscape 6 should provide this functionality as 
well, so users still can toggle "mark as deleted" messages between mark or 
unmark for those deleted messages.

Setup Info:
1) Use an IMAP account.
2) Set up "Mark it as deleted" mode for deleting message from Mail/News Account 
settings

Steps:
1) Login to above setup IMAP mail account
2) Delete messages(It will display a "x" sign for those mark as deleted 
messages)
3) Select/highlight that mark deleted messages
4) Select the "delete" button again from the tool bar should unmark the x sign 
in order to undo the "mark as deleted" messages
5) Actual Results: "Delete" button is not working for unmarking "mark as 
deleted" messages in the thread pane.

Expected results: "Delete" button should work for unmarking "mark as deleted" 
messages in the thread pane.
QA Contact: esther → huang
Summary: Use "delete" button to toggle "mark as delete" for IMAP → IMAP: Use "Delete" button to toggle "mark as delete" messages in the thread pane
triaging to a future release.
Target Milestone: --- → Future
yes, this is important to fix.
Assignee: mscott → bienvenu
Keywords: mail3
changing priorities
Priority: P3 → P2
Don't forget to change `Delete' to `Undelete' in the main menus and context menu 
as well.
*** Bug 62521 has been marked as a duplicate of this bug. ***
Regarding the menu change comment: 4.7 win32 doesn't toggle Delete menu 
item/context to Undelete.  
*** Bug 55037 has been marked as a duplicate of this bug. ***
marking nsbeta1+ and moving to mozilla0.8 milestone.
Keywords: nsbeta1
Whiteboard: [nsbeta1+]
Target Milestone: Future → mozilla0.8
*** Bug 62390 has been marked as a duplicate of this bug. ***
reassigning to naving
Assignee: bienvenu → naving
re: menu toggle, Communicator 4.7 didn't but it should have. Thinking back 
really far, I can't remember if pine required you to use separate commands for 
delete or undelete...

Outlook has separate "Delete" and "Undelete" items, and they light 
appropriately. Only Delete has a shortcut.

What I would really like is for the "Delete" key and "delete button" or any 
other non-menu UI to toggle the delete flag. That is the fastest way to use the 
delete mode. I don't think the menu design is that important, because everyone 
I know that uses this mode is going for speed.
moving to mozilla0.9
Target Milestone: mozilla0.8 → mozilla0.9
We already have "undo delete messages". Why add another button that does the 
work of undo ?
Because sometimes people want to delete messages that they did not immediately 
delete.

For example, if a filter moved a message, you might decide you want it to remain 
in your INBOX.

Or you might have deleted a message in a previous session, and now you can't 
UNDO DELETE.

The feature was in Communicator 4 + it's consistent with what outlook, eudora 
and pine allow.
marking nsbeta1- and moving to future milestone.
Keywords: nsbeta1nsbeta1-
Whiteboard: [nsbeta1+] → [nsbeta1+ 2/21]
Target Milestone: mozilla0.9 → Future
I have to use communicator to open the same mailbox and undelete messages I 
can't "undo delete" on.

This annoys me every day,
marking for dogfood, using the new criteria.

I'd like to see people use IMAP in this mode for a week and then make a nsbeta 
decision after getting a taste of what this is like.

I also imagine this is not a huge request for engineering time, it's just an 
IMAP flag.
Keywords: dogfood
converting from dogfood to catfood nomination.
Keywords: nsdogfoodnsCatFood
I found a workaround:

Select the deleted message you want to undelete.

Delete it "again".
Then undelete.

This suggets that the delete command is somewhat mindless and tries to delete
already deleted stuff. I can investigate this further at some later date.
(spam apology) Cool workaround!
*** Bug 79998 has been marked as a duplicate of this bug. ***
I don't think this new dupe is the same bug...
Blocks: 82056
The workaround doesn't work now Linux nightly 2001061821. Also not platform
specific bug. And setting severity to enh.
Severity: normal → enhancement
OS: Windows NT → All
Hardware: PC → All
The workaround is dependent on undo working, which doesn't work all the time.
Severity: enhancement → normal
Keywords: 4xp
*** Bug 83929 has been marked as a duplicate of this bug. ***
*** Bug 89940 has been marked as a duplicate of this bug. ***
Adding "Undo" in the summary since "Undo" "mark as delete" is not working 
either....
Raising severity to major since there are many people complaining about this 
problem and there are many dup bugs of this bug.....
So, is the target milestone still "Future"? 
Severity: normal → major
Summary: IMAP: Use "Delete" button to toggle "mark as delete" messages in the thread pane → IMAP: Use "Delete" & "Undo" button to toggle "mark as delete" messages in the thread pane
Summary: IMAP: Use "Delete" & "Undo" button to toggle "mark as delete" messages in the thread pane → IMAP: Use "Delete" button & "Undo" to toggle "mark as delete" messages in the thread pane
Karen,

Undo delete is working - but the UI does not show this.

Delete a message, choose undo (thew message is marked as deleted) 
change folder and change folder back and the message is not marked as deleted.
Updating the summary to make it more clear.
I am wondering to know whether we can fix this bug earlier...
Are you sure this will be a "Future" bug?

I am nominating this bug for nsBranch since without this bug fix, user won't be 
able to "Undo" the "Mark as delete" messages. (users won't know they need to 
select the other folder to refresh this functionality on UI...)
If this won't be fixed on next release, at least this shouldn't be a "future" 
bug......
Keywords: nsBranch
Summary: IMAP: Use "Delete" button & "Undo" to toggle "mark as delete" messages in the thread pane → Cannot Undo IMAP "Mark as delete" messages by selecting "Undo" menu and "Delete" button
so I found out that we are marking imap delete twice once before we go to the 
server and once after, so it unsets during the deletion, and when we do undo it 
sets back the delete flag.
Undo/Redo is working from bug 94662.
I am updating summary back for toggle.....
Summary: Cannot Undo IMAP "Mark as delete" messages by selecting "Undo" menu and "Delete" button → IMAP Mark as Deleted Mode: Need to use "Delete" button for toggle mark/unmark for "mark as deleted" msgs
Blocks: 99230
cleaning up nsbranch keywords. 
Keywords: nsbeta1-, nsbranch
No longer blocks: 99230
*** Bug 101525 has been marked as a duplicate of this bug. ***
Changing my e-mail address.
Removing old e-mail address.
Attached patch proposed fix (obsolete) — Splinter Review
I've just attached a fix for this bug. It checks if the selected message already
has IMAP_DELETED flag set and unsets it when necessary.
Does this code have the same effect on multiple messages as mark and flag?
Yes, it does.
Purely as a spin-off from this bug it might be an idea to mark the delete
menuitem and/or mail button as "checked" so that it's more obvious that clicking
delete will actually undelete. Although there is then the question of whether
the news mark button should show as "checked" when the current message is read.
This is about another bug. See 82056.
Anyone can review the fix?
your patch does nothing about the undo object, I mean if the user has 
undeleted the message, if he does Edit | Undo delete message what happens?

Also i don't think that updateFolder() is needed. 
*** Bug 108051 has been marked as a duplicate of this bug. ***
*** Bug 114001 has been marked as a duplicate of this bug. ***
Nominating nsbeta1 since there are many dup bugs in this bug and there are users 
expecting this to work.
Keywords: nsbeta1
Stuff that this needs to work:
1. The "Delete" menuitems needs to be type="checkbox"
2. The context checked states need to be updated when the popups open
3. The main checked state needs to be updated by the controllers
4. Create SelectedMessagesAreDeleted() function in mailWindowOverlay.js
5. isIMAPDeleted attribute needs to be added to nsIMsgHdr.idl
6. C code written to support isIMAPDeleted attribute

I can't do point 6 but I've got a patch for the rest, should you want it.
these two are not needed:

5. isIMAPDeleted attribute needs to be added to nsIMsgHdr.idl
6. C code written to support isIMAPDeleted attribute


all you need to do is get the flags and check the imap deleted flag. (Plus, we
don't write c code :-) )
OK, so why does mark read/unread and flagged do it like that then?
"to make our js cleaner", according to the comment in the idl. However, it's not
needed. I'd rather not expose all 32 msg flags as individual attributes and
methods in the idl and we have to draw the line somewhere. If the js is terribly
ugly, I guess we could add an attribute, or add a boolean method that takes a
flag and tells you if it's set. Also, the UI changes you're describing should
only be in affect if the imap server of the folder selected is using the imap
delete model, and you'll need to do lots of work to determine that (not everyone
uses the imap delete model).
You'll find it difficult to select a deleted message if you're not using the
IMAP delete model. And this is the only case in which the UI would be different.
*** Bug 115122 has been marked as a duplicate of this bug. ***
Status: NEW → ASSIGNED
Keywords: mail3, nsbeta1nsbeta1+
Whiteboard: [nsbeta1+ 2/21]
Is this really a nsbeta1+, P2? If yes, then we need to try and schedule it for
the MachV release. If its not gonna happen then we should nsbeta1- it, or chage
the priority to P3.
We need to do this.
Target Milestone: Future → mozilla0.9.9
Attached patch proposed fixSplinter Review
The fix is to basically toggle the deleteFlag when deleting already deleted
imap messages. For undo and redo to undo/redo last action I had to add another
method that gives the deleteFlag for the hdr so that we can toggle. 

david, can you review?
Attachment #54062 - Attachment is obsolete: true
+    if (flags & MSG_FLAG_IMAP_DELETED)
+      *aResult = PR_TRUE;
+    else
+      *aResult = PR_FALSE;

this can just be 
*aResult = (flags & MSG_FLAG_IMAP_DELETED) != 0;

the rest looks good, r=bienvenu
Would it be difficult also to toggle the menu and button to reflect the
'undelete' function when a 'marked deleted' message is highlighted?
That would be a separate bug. this bug is a request to make it behave like 4.x
*** Bug 123610 has been marked as a duplicate of this bug. ***
fixed
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
*** Bug 124977 has been marked as a duplicate of this bug. ***
Adding to status whiteboard AOLTW and plussing bugs definite requirements,
adding just AOLTW for possibles.
Whiteboard: AOLTW
Michael, has anyone at AOLTW said they use the IMAP delete model? It's not
something that many users use.
David, I think we will probably want this fix if we take bug 11926 for AOLTW. 
And it's not all sure we will take bug 11926, hence I just AOLTW'ed this bug,
with no plus.  Hope this helps.
Removed AOLTW
Whiteboard: AOLTW
removed the item for this bug from the release notes for 0.9.9 and beyond,
because the bug is fixed now. Let me know if you think the item should be 
re-added.
Verified on Windows 05-12-20-branch-pr1
Linux 05-12-23-branch-pr1
Mac 05-12-17-branch-pr1
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: