Using apr16 trunk win98 Using apr12 branch win98, linux rh6.2 If you used Ctrl+A or Shift+Select to select all messages in an IMAP folder (Move to Trash delete setting) then clicked delete, if you go to Undo Delete nothing happens. The trash message count appears to still have the deleted messages, but when you go to trash to find them (and manually undelete them) the messages don't appear and the count in trash folder decreases. Opening the original folder again does not display the messages... they have apparently been really deleted. Every once in awhile the messages will indeed still show in the trash folder (this may be only when using Shift+Select), but most of the tries I found no messages displaying in trash. I found this to happen in either threaded mode or flat sort, View All messages. This happened for me in many tries, but only when I selected folders having approx 35 messages or more, more than a thread pane screen -- it didn't happen when I used small folders. Steps: 1. Open an IMAP folder on (account which is set to move messages to trash on delete) with lots of messages. View is set to View All messages. Ctrl+A to select all messages. 2. Click Delete button. Messages are removed from the thread pane. 3. Still in the folder thread pane, Edit|Undo Delete. Nothing happens -- the thread pane is still blank. 4. Trash folder shows message total with a count that indicates messages are still in trash. Select the trash folder, the deleted messages may or may not appear in the trash. Result: Undo delete of all messages in IMAP folder doesn't work properly. In many cases it will not display the messages in either trash folder or original folder. Note: I did not see the problem on POP. Expected: After Undo delete, messages should appear back in thread pane. At worst case they should always still be in the trash for user to move back to folder (manually undo).
taking. I am Undo owner, you can file Undo bugs on me directly.
Assignee: mscott → naving
In most cases, if the messages are not in the trash or the original folder, they do not show up after restart, either.
dup of bug 132121?
Bug 132121 is about Shit+Delete as in Delete Immediately without sending to trash. So, no, I wouldn't think this is a duplicate of that.
Obviously, that last comment was supposed to be SHIFT + Delete, shift with an f in it. No four letter word slinging was intended.
I am able to reproduce this on 4.x also. Looks like this bug has been around for a while.
Status: NEW → ASSIGNED
Summary: Undo delete of select all msgs not working, msgs may not appear in trash or orig folder → IMAP: Undo delete of select all msgs not working, msgs may not appear in trash or orig folder
Created attachment 79713 [details] [diff] [review] proposed fix The fix is to not do an expunge when we are liteSelecting a folder because we could be doing an undo.
david, can you review ? thx.
Summary: IMAP: Undo delete of select all msgs not working, msgs may not appear in trash or orig folder → IMAP: Undo delete of select all msgs not working (DeleteIsMoveToTrash() mode)
Comment on attachment 79713 [details] [diff] [review] proposed fix r=bienvenu - makes sense
Attachment #79713 - Flags: review+
Comment on attachment 79713 [details] [diff] [review] proposed fix sr=mscott
Attachment #79713 - Flags: superreview+
fixed on trunk.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
Laurel, can you test this patch on the trunk build and update the bug with the results?
Using apr19 trunk, win98: I've done many tries with today's trunk and have mixed results to report... A straight, simple, Undo delete of a select all messages will usually work in this build. I did see it fail once at this level. However, if you've previously done things such as delete a couple individual messages and/or changed folders before the select All delete, you'll run into some problems. Some things I'm seeing: 1. Upon the Undo of the All deletion I'm often seeing the messages in both the Trash and the originating folder, i.e. they were not released from the trash. 2. If you do any further delete/undo operations if you're in condition #1 above, things can get screwy and undo often won't work. 3. In many cases I'm seeing the Undo appear not to work, but if you click the thread pane in the folder, the messages refresh/appear. 4. If I do a Del/Undo/Redo/Undo, I'm finding the messages are usually jumping into a black hole somewhere and don't come back. Bottom line: Simplistic Undo of Select All & Delete will usually work. If you add anything before the simplistic part, you may get some screwy results. I'll let you all decide whether this means it's okay for the branch.
Oh, yeah. The case I saw where the simplistic delete/undo failed, the messages were still appearing in the trash, so they weren't totally missing.
Laurel - Are you verifying this as fixed, and that this patch does not cause any other regressions? [adt2] - As this will be very severe for the people that hit this, however, this does not seem like a very likely scenario, and users who delete all from folders, can probably retrieve the data from their Trash Folder.
I went back to 6.2.2 and tried to see if the surrounding issues were there. Of course, it was hard to tell because select all+delete+undo didn't work. I ran into similar cases in that the thread pane didn't refresh after undo until you clicked in the thread pane... I suppose this was all there. Ditto for previous trunk/branch versions of current release. So, I guess it's better than it was, but we still have some goofy paths where undo screws up. I guess I'll go for marking this verified on trunk, april 19 commercial trunk win98.
Status: RESOLVED → VERIFIED
The only thing I can shed light on is that if you delete a bunch of messages, select another folder, and then select the first folder again, undo may not work simply because selecting the folder can cause an expunge, which permanently removes the deleted messages from the folder. That's always been true, even back in 4.x
In Jaime's reason for ADT2 he said the user can always go to the trash. Is that true? It sounds like from the original description that a lot of the time the messages aren't in the trash. Or, is that only after doing undo?
Without the fix, if the user does Undo delete, they may or may not have the messages in the trash. With the fix, the likelihood they're in the trash is good. With/without the fix, if the user does a delete without Undo, the messages are in the trash.
I think that's after doing undo - undo removes the deleted message from the trash, but then can't restore it to the original folder because it does that by unsetting the /deleted flag on the message in the original folder. If an expunge has happened, then that won't work because expunge *really* deletes deleted messages. It seems to me that if we detect this case, we should be moving the message from the trash to the source folder.
yes, we should try to move the msgs from trash to source folder if an expunge has happened. I'll log a separate bug for that. If you don't do undo the msgs should be in trash.
let's get this one for RTM, adt1.0.0-.
Keywords: adt1.0.0 → adt1.0.0-
Whiteboard: [adt2] → [adt2 RTM]
You need to log in before you can comment on or make changes to this bug.