Last Comment Bug 190974 - [IMAP] Can't manage mail by 'deleted' flag
: [IMAP] Can't manage mail by 'deleted' flag
Status: RESOLVED FIXED
:
Product: MailNews Core
Classification: Components
Component: Filters (show other bugs)
: Trunk
: All All
: -- enhancement with 8 votes (vote)
: mozilla1.9.1a1
Assigned To: Dale Wiggins
:
:
Mentors:
: 243075 247977 359281 (view as bug list)
Depends on:
Blocks: 444147 446417 359281
  Show dependency treegraph
 
Reported: 2003-01-28 09:17 PST by David Given
Modified: 2014-06-03 10:06 PDT (History)
22 users (show)
davida: blocking‑thunderbird3.0a2+
mkmelin+mozilla: blocking‑thunderbird3+
mkmelin+mozilla: wanted‑thunderbird3.0a2+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Implementation of viewing non-deleted IMAP messages (11.70 KB, patch)
2007-10-12 09:42 PDT, Jeff Beckley
no flags Details | Diff | Splinter Review
Changes David suggested (16.17 KB, patch)
2007-10-14 17:06 PDT, Jeff Beckley
mscott: review+
mozilla: superreview+
Details | Diff | Splinter Review
supplemental patch for SM (needs attachment 284895); for check-in (3.12 KB, patch)
2008-01-27 15:55 PST, Karsten Düsterloh
no flags Details | Diff | Splinter Review
Original implementation plus Karsten's SeaMonkey addition. (17.43 KB, patch)
2008-01-29 07:38 PST, Dale Wiggins
mnyromyr: review+
Details | Diff | Splinter Review
Duplicate diff removed (13.17 KB, patch)
2008-02-23 18:00 PST, Jeff Beckley
no flags Details | Diff | Splinter Review
Fixes View toolbar popup not being updated (13.26 KB, patch)
2008-03-25 17:16 PDT, Jeff Beckley
mozilla: superreview+
Details | Diff | Splinter Review
Fixed bit rot in last submitted patch (7.69 KB, patch)
2008-06-25 10:49 PDT, Dale Wiggins
mnyromyr: review-
Details | Diff | Splinter Review
Fix for bad path info and missing suite change in last patch (8.54 KB, patch)
2008-06-25 11:36 PDT, Dale Wiggins
mnyromyr: review+
mozilla: superreview+
Details | Diff | Splinter Review
fix bitrot in previous patch version (13.22 KB, patch)
2008-07-08 13:41 PDT, Dan Mosedale (:dmose)
dmose: review+
dmose: superreview+
Details | Diff | Splinter Review

Description David Given 2003-01-28 09:17:36 PST
User-Agent:       Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20021208 Debian/1.2.7-5
Build Identifier: Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20021208 Debian/1.2.7-5

I have just migrated from Evolution, where I was used to leaving deleted
messages in my IMAP folders. Evolution would hide the deleted messages for me.

However, not only does Mozilla not allow me to view only non-deleted messages,
it won't even let me sort or filter by whether a message is deleted. 'Message
Status' consists of Read/Unread/Replied/Forwarded; 'Deleted' should be one of
these. The only way of manipulating the 'Deleted' flag is to toggle it with the
'Delete' button. It should be treated like any other mail header.


Reproducible: Always

Steps to Reproduce:
1. Place some messages in an IMAP folder.
2. Set that account to mark-as-deleted.
3. Mark some of them as deleted.
4. There is now no way of sorting the list so that all the deleted messages are
hidden, or shown first (or last).



Expected Results:  
Desired behaviour:

* An option in the View menu; 'Don't show deleted'.
* A new column in the address list to show the state of the deleted flag. Or,
add it to the Message Status column.

This makes the mark-as-deleted trash mode pretty much unusable. In this mode,
all deleting a message does is put a big X through the icon in the address list;
it still appears in the list and takes up mental and screen real estate. Check
out Evolution, which does this properly (if very slowly).
Comment 1 Stefan Borggraefe 2003-09-06 02:37:21 PDT
Not really a bug, but a reasonable enhancement request. Couldn't find a dupe and
I think this feature would really make sense. Marking NEW.

-> MailNews/Filters
Comment 2 David Given 2005-04-05 03:07:49 PDT
I recently had occasion to need this again, and had another look. It turns out
that the View->Messages filters *also* can't select by deleted flag (otherwise I
could just create a filter that only showed non-deleted messages).

The information's there, so it must be pretty simple to add a new filter type
--- how well documented is all this stuff?
Comment 3 (not reading, please use seth@sspitzer.org instead) 2007-06-21 15:07:25 PDT
sorry for the spam.  making bugzilla reflect reality as I'm not working on these bugs.  filter on FOOBARCHEESE to remove these in bulk.
Comment 4 Jeff Beckley 2007-10-12 09:42:06 PDT
Created attachment 284637 [details] [diff] [review]
Implementation of viewing non-deleted IMAP messages

Here's an implementation of a Mailbox View that filters out deleted messages in IMAP mailboxes.
Comment 5 Jeff Beckley 2007-10-12 09:45:54 PDT
Dale Wiggins <dwiggins@qualcomm.com> wrote the code (I was just submitting it), so I'm reassigning the bug to him.
Comment 6 David :Bienvenu 2007-10-12 13:25:19 PDT
cool - my preference would be to not show this menu item at all unless it was an imap folder (i.e., hidden, not just disabled), and only show it if the current server is using the imap delete model. Would that be OK?
Comment 7 Jeff Beckley 2007-10-14 17:06:28 PDT
Created attachment 284895 [details] [diff] [review]
Changes David suggested

This patch implements the suggestions that David made.  The menu item is now hidden if it doesn't apply, and it only applies if the account is currently using the IMAP delete model.
Comment 8 David :Bienvenu 2007-10-14 17:19:13 PDT
Comment on attachment 284895 [details] [diff] [review]
Changes David suggested

great, thx!
Comment 9 Karsten Düsterloh 2007-10-14 23:07:29 PDT
Comment on attachment 284895 [details] [diff] [review]
Changes David suggested

>Index: mail/locales/en-US/chrome/messenger/msgViewPickerOverlay.dtd
>Index: mailnews/base/resources/content/mailWindowOverlay.xul
>Index: mailnews/extensions/mailviews/resources/content/msgViewPickerOverlay.xul

This will break SeaMonkey at first sight.
You'll need to change /suite/locales/en-US/chrome/mailnews/msgViewPickerOverlay.dtd as well, I'll have a look at the rest tonight.
Comment 10 Scott MacGregor 2007-12-05 23:48:32 PST
Comment on attachment 284895 [details] [diff] [review]
Changes David suggested

you might want to ask one of the seamonkey guys to fix this for seamonkey too - by adding the new string entity to their version of msgViewPickerOverlay.dtd	, or you can do it yourself.
Comment 11 Jiri TRAVNICEK [:JITR] 2008-01-10 16:26:07 PST
Bug #196035 and bug #304809 seem to depend on this bug. Perhaps they should be added as blockers...
Comment 12 Magnus Melin 2008-01-11 13:54:13 PST
Any update on the seamonkey part, so we can get this in?
Comment 13 Karsten Düsterloh 2008-01-27 15:55:31 PST
Created attachment 299629 [details] [diff] [review]
supplemental patch for SM (needs attachment 284895 [details] [diff] [review]); for check-in

Basically, SM is just lacking the .dtd, but I included an unbitrotted patch against mailWindowOverlay.xul as well. You can check in this along with your patch and r=me for the overall SM changes.
Comment 14 Dale Wiggins 2008-01-29 07:38:52 PST
Created attachment 300024 [details] [diff] [review]
Original implementation plus Karsten's SeaMonkey addition.

This patch contains the original implementation, changes suggested by David and Karsten's SeaMonkey changes. Hopefully this patch wraps this one up.
Comment 15 Karsten Düsterloh 2008-02-01 09:36:44 PST
Comment on attachment 300024 [details] [diff] [review]
Original implementation plus Karsten's SeaMonkey addition.

>Index: mailnews/extensions/mailviews/resources/content/msgViewPickerOverlay.js
>===================================================================
>Index: mailnews/extensions/mailviews/resources/content/msgViewPickerOverlay.js
>===================================================================

It's kinda worrying to see the same file patched twice identically. ;-)
Especially since patch (of course) can't apply the second instance...
Comment 16 Dale Wiggins 2008-02-01 09:44:43 PST
>It's kinda worrying to see the same file patched twice identically. ;-)
>Especially since patch (of course) can't apply the second instance...

Huh. I didn't generate the initial patch so I'm not sure what happened there. I took the original patch and added the SeaMonkey change.
Comment 17 Jeff Beckley 2008-02-01 10:20:47 PST
That was my bad in the second patch where I had added the changes David had suggested.  Not sure how it happened, but the first version of msgViewPickerOverlay.js in the patch is the one with the extra changes, whereas the second version is the original changes.  Just ignore the second one.  :-)
Comment 18 Jeff Beckley 2008-02-23 18:00:27 PST
Created attachment 305277 [details] [diff] [review]
Duplicate diff removed

Here's a clean version of the patch with the duplicate file diff removed.
Comment 19 Matt Dudziak 2008-03-06 15:09:21 PST
*** Bug 359281 has been marked as a duplicate of this bug. ***
Comment 20 David :Bienvenu 2008-03-21 08:36:59 PDT
Jeff/Dale, unless I did something wrong, after applying that last patch, I still see View | Not deleted in the view menu for local folders, imap folders, etc. I mean the view drop down menu on the toolbar.
Comment 21 Jeff Beckley 2008-03-25 15:43:16 PDT
You're right, David.  "Not Deleted" gets hidden from the View->Messages menu, but not from the View popup on the toolbar.  We'll have to fix that.
Comment 22 Dale Wiggins 2008-03-25 15:52:37 PDT
Huh, thought I had tested that case. I'll take a look.
Comment 23 Jeff Beckley 2008-03-25 17:16:53 PDT
Created attachment 311694 [details] [diff] [review]
Fixes View toolbar popup not being updated

This patch adds the code to get the View popup on the toolbar to update before it pops up, so it fixes the problem of the "Not Deleted" item showing up on mailboxes where it doesn't belong.
Comment 24 Magnus Melin 2008-05-04 07:37:17 PDT
*** Bug 243075 has been marked as a duplicate of this bug. ***
Comment 25 km 2008-05-04 09:30:28 PDT
I've been using my own patches from 243075 for years, every time I need to update thunderbird to a new version or platform. I've really been hoping that they would be integrated so that I could run binary releases.

Since the patch here in 190974 speak to the same issue I'm happy to switch. But is this patch on the road to integration? Will it show up in a 2.x as well as 3.x?
Comment 26 Magnus Melin 2008-05-07 10:56:05 PDT
This will be available for 3.0 only. (as soon as it get's sr+)
Comment 27 km 2008-05-23 07:22:30 PDT
(In reply to comment #26)
> This will be available for 3.0 only. (as soon as it get's sr+)
> 
Any progress on sr+? Seems like its been a while.

Comment 28 km 2008-06-22 19:52:51 PDT
I've running this patch for a month now, with no problem. It would be great to have it integrated.
Comment 29 Tilman Schmidt 2008-06-23 00:11:27 PDT
How can I apply this patch to my Seamonkey and Thunderbird installations?
Comment 30 David :Bienvenu 2008-06-24 07:52:39 PDT
Comment on attachment 311694 [details] [diff] [review]
Fixes View toolbar popup not being updated

I tried this out - seems to work right, including with quick searches.
Comment 31 David Ascher (:davida) 2008-06-24 10:48:26 PDT
Let's get this in a2.
Comment 32 Dale Wiggins 2008-06-25 10:49:36 PDT
Created attachment 326738 [details] [diff] [review]
Fixed bit rot in last submitted patch

This should address the bit rot issue. No substantive changes.
Comment 33 Karsten Düsterloh 2008-06-25 11:23:17 PDT
Comment on attachment 326738 [details] [diff] [review]
Fixed bit rot in last submitted patch

The file mozilla/suite/locales/en-US/chrome/mailnews/msgViewPickerOverlay.dtd  is missing and your diff prefixes "../mozilla-orig/" won't lead far either...
Comment 34 Dale Wiggins 2008-06-25 11:36:02 PDT
Created attachment 326750 [details] [diff] [review]
Fix for bad path info and missing suite change in last patch

Fixed bad path references and missing suite file. continuing r=mnyromyr sr=bienvenu
Comment 35 Karsten Düsterloh 2008-06-27 00:54:24 PDT
Comment on attachment 326750 [details] [diff] [review]
Fix for bad path info and missing suite change in last patch

I need to look at this a bit closer, since diffing the diffs gives strange results... (Bugzilla doesn't like it all, kdiff3 finds substantial differences.)
Resetting r/sr for now.
Comment 36 David :Bienvenu 2008-06-30 16:35:55 PDT
Comment on attachment 326750 [details] [diff] [review]
Fix for bad path info and missing suite change in last patch

this looks ok to me
Comment 37 Magnus Melin 2008-07-01 08:17:48 PDT
There's still the review pending (comment 35).
Comment 38 David Ascher (:davida) 2008-07-05 17:52:33 PDT
Karsten, any chance you can look at this soon, to have it make it in 3.0a2?
Comment 39 Karsten Düsterloh 2008-07-08 10:36:22 PDT
Comment on attachment 326750 [details] [diff] [review]
Fix for bad path info and missing suite change in last patch

Sorry for the delay. :(
Comment 40 Dan Mosedale (:dmose) 2008-07-08 13:41:32 PDT
Created attachment 328559 [details] [diff] [review]
fix bitrot in previous patch version

Unbitrotted the patch; carrying forward r and sr.
Comment 41 Dan Mosedale (:dmose) 2008-07-08 13:56:17 PDT
Patch checked in; thanks Dale!

Checking in mail/base/content/mailWindowOverlay.xul;
/cvsroot/mozilla/mail/base/content/mailWindowOverlay.xul,v  <--  mailWindowOverlay.xul
new revision: 1.253; previous revision: 1.252
done
Checking in mail/locales/en-US/chrome/messenger/msgViewPickerOverlay.dtd;
/cvsroot/mozilla/mail/locales/en-US/chrome/messenger/msgViewPickerOverlay.dtd,v  <--  msgViewPickerOverlay.dtd
new revision: 1.5; previous revision: 1.4
done
Checking in mailnews/base/resources/content/mailWindowOverlay.xul;
/cvsroot/mozilla/mailnews/base/resources/content/mailWindowOverlay.xul,v  <--  mailWindowOverlay.xul
new revision: 1.356; previous revision: 1.355
done
Checking in mailnews/extensions/mailviews/resources/content/msgViewPickerOverlay.js;
/cvsroot/mozilla/mailnews/extensions/mailviews/resources/content/msgViewPickerOverlay.js,v  <--  msgViewPickerOverlay.js
new revision: 1.27; previous revision: 1.26
done
Checking in mailnews/extensions/mailviews/resources/content/msgViewPickerOverlay.xul;
/cvsroot/mozilla/mailnews/extensions/mailviews/resources/content/msgViewPickerOverlay.xul,v  <--  msgViewPickerOverlay.xul
new revision: 1.11; previous revision: 1.10
done
Checking in suite/locales/en-US/chrome/mailnews/msgViewPickerOverlay.dtd;
/cvsroot/mozilla/suite/locales/en-US/chrome/mailnews/msgViewPickerOverlay.dtd,v  <--  msgViewPickerOverlay.dtd
new revision: 1.7; previous revision: 1.6
done
Comment 42 Nikolay Shopik 2008-07-10 05:54:16 PDT
I'm on version 3.0a2pre (2008071003) and not seeing any additional menus. Where should I look? I have enabled mark as deleted model.
Comment 43 Magnus Melin 2008-07-12 13:48:35 PDT
Look in the Folder views widget (in the toolbar) and under View | Messages
Comment 44 Jeff Beckley 2008-07-12 14:29:27 PDT
I'm not sure if this is a bug or intended behavior (it's behaving the same in TB 2.0 as well), but you don't get the View->Messages menu unless you have the Mail Views control on your toolbar.  You can get that by right-clicking on the toolbar, and selecting Customize.  You may have to scroll until you can see the Mail Views control in the dialog, but then drag it to your toolbar and hit OK in the dialog.  Once you do that you can either change to the Not Deleted view in the Mail Views toolbar control or the View->Messages menu.
Comment 45 Nikolay Shopik 2008-07-12 14:33:50 PDT
Thanks guys, that's do a trick. It have per folder settings, can I override this to all new created folder and others?
Comment 46 Magnus Melin 2008-07-12 14:43:49 PDT
(In reply to comment #44)
Not so intended - bug 332802.

(In reply to comment #45)
Bug 277072.
Comment 47 Nikolay Shopik 2008-07-13 01:41:07 PDT
Seems working fine for me, here my observation.
When I delete message it will stay here until I select other folder and come back. Selecting folder with deleted messages where I have them, show every messages for about 1 sec. Is this intended behavior?
Comment 48 Christof Drescher 2008-07-14 00:32:15 PDT
(In reply to comment #47)
> When I delete message it will stay here until I select other folder and come
> back.

I am observing the same behaviour, which makes the enhancement not really
usable to me; also, it is different from the behaviour of all other clients.

Is there a way to have TB auto-update the view after deleting a message?
Comment 49 Nikolay Shopik 2008-07-21 08:08:09 PDT
bug 446417 filed according my comment 47
Comment 50 Christof Drescher 2008-08-11 10:04:01 PDT
I'm sorry to post again, but...

I wonder if the current fix really helps all the people out there waiting for this feature for such a long time. The issue (hiding deleted mails in IMAP model) has been around for years now, having a few "duplicate" bugs finally going into this one...

The result is, IMHO, not at all sufficient. It does not work "instantly" as expected and it is not flexible (no customized views with this "deleted-check" possible).

As all older bugs filed seem to have been closed, I would like to add a "wish" again: Why not have the flag "message deleted" as an option in the "customized message views" system, where we can choose it like all other "status" flags to filter and select? AFAIK, there has been a patch allowing just that before in one of the "closed" bugs anyway!

And, still, why does an action like "deleting" not enforce an automatic update of the current view - which would make using possible.

Again: Without at least the latter, the whole "fix" seems no help at all.

Sorry to bother...
Comment 51 jmorrison 2008-08-11 10:33:23 PDT
I think not automatically updating should be a separate bug since it may not be related. I can go into the Tasks view, type in a task where it says "Click here to add a new task" and add a task, and the task view does not update automatically either. I have to switch away and back before I see the task, even though the task alarm triggers immediately.
Comment 52 jmorrison 2008-11-19 11:21:26 PST
This still isn't fixed in the released version.
The diffs uploaded in https://bugzilla.mozilla.org/attachment.cgi?id=328559&action=edit aren't applied the released source as of 2.0.0.18
Comment 53 Jeff Beckley 2008-11-19 11:27:03 PST
This fix won't be applied to 2.0 versions.  It's only in 3.0 builds.
Comment 54 Magnus Melin 2009-01-26 09:17:31 PST
*** Bug 247977 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.