Open Bug 635869 Opened 14 years ago Updated 2 years ago

deleted messages in search folder not showing deleted, when mail/article of highest "Order Received" value in search folder is not mail in IMAP folder which is owned by IMAP account who uses IMAP delete model of "Just mark it as deleted"

Categories

(Thunderbird :: Folder and Message Lists, defect)

defect

Tracking

(Not tracked)

People

(Reporter: brian, Unassigned)

References

(Blocks 1 open bug)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Ubuntu/10.10 Chromium/10.0.648.82 Chrome/10.0.648.82 Safari/534.16
Build Identifier: 

I have a search folder that shows me all of the unread mail in a number of real (IMAP, NNTP, and RSS) folders.

Usually progressing through the search folder deleting messages as I read them works fine.  Occasionally however, I will find that when I progress through the search folder deleting messages, they don't actually show deleted for NNTP and IMAP messages, but still show as Read even though I press the delete key (or button) on them.  In this scenario, deleting RSS messages works fine.  In fact it works correctly.  That is, in this scenario, bug 635613 is not exhibited.  Additionally, pressing delete does not move the message cursor to the next message as it typically does on the IMAP and NNTP messages.

What makes this doubly interesting is that if I switch the viewed folder to the real (IMAP and NNTP) folders, I see that the messages that were not showing as deleted in the search folder are in fact deleted in the real folder, so this problem is simply a display issue with search folders.

Reproducible: Sometimes
What is diference between "not showing as deleted" and "in fact deleted"?
For a mail in real IMAP folder, with IMAP delete model of "Just mark it as deleted", (a) "mail is not shown with strike line at thread pane"=="not showing as deleted" and (b) "mail is not shown with strike line at thread pane"=="in fact deleted"?

If this case, I could see next with quick check.
(0) Next three Tb windows are opened, each folder is selected.
    "Order Received" column(UID of mail if IMAP), "Account" column is shown.
     For testing, IDLE is disabled, and automatic new mail check is disabled.  
     Yahoo! Mail IMAP folder who supports mail delete by \Deleted flag
     ordinary is used(not Gmail IMAP).

  window     Tb window-1         Tb window-2         Tb window-3
  selected   Consolidated        Virtual Folder      real Inbox of
    folder    Inbox               target=Inbox of     IMAP account-1
                                  IMAP account-1

(case-1) Detete a mail at window-3(real IMAP inbox)
    window-3 : shown with strike line   
    window-2 : shown with strike line   
    window-1 : not shown with strike line,
               if re-opened, mail disappears.
               Deleted mail sems excluded if Consolidated folder.   
(case-2) Detete a mail at window-2(Virtual folder)
    window-2 : shown with strike line   
    window-3 : shown with strike line   
    window-1 : not shown with strike line
               if re-opened, mail disappears   
(case-3) Detete a mail in real Inbox of IMAP account-1 at window-1
         (Consolidated Inbox)
    window-1 : not shown with strike line.
               if folder is re-opened, mail disappears.
    window-2 : shown with strike line
    window-3 : shown with strike line

It may be not accurate result, but I could see phenomenon of "not shown with strike line by delete a mail" at Consolidated Inbox which is implemented as "Virtual Folder"(Search Folder) internally. And, I could see "doesn't move to next mail after delete" in this case. 

Which folder view is used at folder pane? "All Folders"? "Consolidated Folders"? Real folders/search folders re opened at multiple tabs or multiple Tb windows? (to see mail list of each folder, no need to re-opn folder. swich tab or switch window is sufficient)

If IMAP, there are three kinds of "Delete".
If "IMAP move to Trash model", both of "copy to Trash" and "store \Deleted" is required and server response about stored \Deleted flag is also required to complete delete operation.
If local mail folder, "move to trash folder" is always applied to Delete.
If NNTP, "delete operation on an news article" is "Cancel Message" of article which posted by myself.
If RSS, server access is done by HTTP.
These are not same, espcially in "delete operation".
If possible, check with "single search target folder only" of Saved Search folder, or describe each case separately, please, to make problem determination simple.
(In reply to comment #1)
> What is diference between "not showing as deleted" and "in fact deleted"?

I have TB configured to just flag IMAP messages as deleted with no moving of deleted messages to a Trash folder or anything like that, so normally as I go through a folder deleting messages, the deleted messages simply show as having a "strikethrough" line through them and with a red "X" icon beside them.

When they are "not showing as deleted" (in the search folder) pressing delete just marks them as read, however when I go to the real IMAP folder that the message is in, it shows as having the strikethrough through it as well as having the red "X".

> If this case, I could see next with quick check.
> (0) Next three Tb windows are opened, each folder is selected.
>     "Order Received" column(UID of mail if IMAP), "Account" column is shown.
>      For testing, IDLE is disabled, and automatic new mail check is disabled.  
>      Yahoo! Mail IMAP folder who supports mail delete by \Deleted flag
>      ordinary is used(not Gmail IMAP).
> 
>   window     Tb window-1         Tb window-2         Tb window-3
>   selected   Consolidated        Virtual Folder      real Inbox of
>     folder    Inbox               target=Inbox of     IMAP account-1
>                                   IMAP account-1

OK.  I have a tab open with my virtual folder as well as a tab with my real IMAP INBOX.  I'm not sure what this "Consolidated Inbox" you are referring to is though.  I'm a fairly new TB user so maybe it's just something I have not come across yet.
 
> It may be not accurate result, but I could see phenomenon of "not shown with
> strike line by delete a mail" at Consolidated Inbox which is implemented as
> "Virtual Folder"(Search Folder) internally. And, I could see "doesn't move to
> next mail after delete" in this case. 

But I am seeing this behavior (no strikethrough and no move to next message) in my virtual folder (your TB window-2).  And I don't always see it.  Sometimes it works as expected and other times it works as described here in this bug.
And yes, I can confirm that switching between the virtual folder tab and the real IMAP INBOX tab, the message shows on the latter with strikethrough and on the former without.

I can even select the message on the virtual folder tab (i.e. the one without the strikethrough) and right click it and there is an "Undelete Message" option.  That option only shows for messages that TB knows are deleted.  If it were in fact not yet deleted that option shows "Delete Message".

I think this just goes to further demonstrate that this is a virtual folder display issue and not a deeper functionality problem.
I meant "Inbox" at "Consolidated Folders" view at folder pane by "Consolidated Inbox". "Consolidated Folders" or "All Folders" is shown at column header of older pane. I believe you use standard/ordinal "All Folders" view.

I could see next phenomenon too,
  When a mail of real IMAP Inbox folder is deleted at a Tb's Tab with Just
  mark it as deleted model, the mail in a Search folder at other Tab is not
  marked as deleted by strike-thru line at thread pane.
  Context menue of the mail at Search folder(shown as "not deleted yet")
  shows "Undelete Message", as you say.
by changing "search target folders to an IMAP folders and several news groups.
In my previous my test, search target folder of saved search folder was single MAP folder only, then only one "mail of UID=N" exists. But after I added several news groups to search target, multiple mails/articles of same "Order Received" column value(UID of mail if IMAP, article number if news) happened.
  a mail of IMAP, article in News-1, News-2, and News-3 had same ID=7.
I guess it's relevant to problem.

Show "Order Receved" column and "Account" column.
"Multiple mails/articles of same ID" case?
Yes, indeed, I have NNTP groups in my virtual folder also.

I am glad you were able to reproduce this behavior by adding NNTP groups to the virtual folder.

I have also found that keeping the IMAP INBOX(es) open in a tab seems to make this (so far, anyway) 100% reproducible.
It's unclear whether "multiple mails/articles of same ID in a saved search folder" is mandatory condition or not, but problem reported by comment #0 was reproduced with the condition.
Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Summary: deleted messages in search folder not showing deleted → deleted messages in search folder not showing deleted, when multiple mails/articles of same ID(==Order Received value) exist in a saved search folder, and when IMAP mail is deleted with IMAP delete model of "Just mark it as deleted"
Version: unspecified → 3.1
Summary: deleted messages in search folder not showing deleted, when multiple mails/articles of same ID(==Order Received value) exist in a saved search folder, and when IMAP mail is deleted with IMAP delete model of "Just mark it as deleted" → deleted messages in search folder not showing deleted, when multiple mails/articles of same ID(==Order Received value) exist in a search folder, and when IMAP mail is deleted with IMAP delete model of "Just mark it as deleted"
As you say, it was simple.
Multiple mail / news article of same ID=7:
(1) in folder-1 of IMAP account-1, with Just mark it as deleted, \Deleted
(2) in folder-2 of IMAP account-2, with Just mark it as deleted, \Deleted
(3) in news-3   of News account-3, Active article
(case-A) Search target folder = folder-1, folder-2
   Mail of (1) & (2) are shown with strike-thru line.
(case-B) Search target folder = folder-1, folder-2, news-3
   Mail of (1) & (2) are not shown with strike-thru line. (this bug's problem)

Because "Just mark it as deleted" is IMAP only option, "strike-thru line" is perhaps killed by news article of same ID=7 which doesn't support "Just mark it as deleted".
(In reply to comment #7)
> As you say, it was simple.
> Multiple mail / news article of same ID=7:

What is this "ID" that you are referring to?  Where can I see it?

> Because "Just mark it as deleted" is IMAP only option, "strike-thru line" is
> perhaps killed by news article of same ID=7 which doesn't support "Just mark it
> as deleted".

That sounds reasonable.  I would be able to concur/confirm if I knew what this ID you are referring to is.
(In reply to comment #8)
> What is this "ID" that you are referring to?  Where can I see it?

I meant, by the term of "ID", value what Tb shows at "Order Received" column of thread pane of a folder of Tb.
  - UID of mail, if IMAP folder
  - Article number, if Newsgroup
  - Offset of mail data in file for mail folder,
    if local mail folder(POP3, "Local Folders")
  - ????, if RSS feed (sorry but I don't know well about RSS case)
What is your recommendation of term, or official term, or appropriate & common term, for all of them? I couldn't imagine other than Identifier==ID for it in this bug's comment.
(In reply to comment #9)
> 
> I meant, by the term of "ID", value what Tb shows at "Order Received" column of
> thread pane of a folder of Tb.

Ahhhh.  Now I see it.

> What is your recommendation of term, or official term, or appropriate & common
> term, for all of them? I couldn't imagine other than Identifier==ID for it in
> this bug's comment.

Your term is just fine.  I just didn't know what it was referring to.  Now I do.  I will keep an eye on that ID value when I am seeing this problem.
It was simpler.
"Existence of same ID in newsgroup" was absolutely irrelevant to problem.
"Existence of newsgroup(I don't know empty newsgroup case) in search target" was sufficient.

When "mixture of IMAP folders and a POP3 account's folder" case, interesting phenomenon was observed.
(a) Two mails in POP3 account's folder, compacted.
    offset of mail-1 = 0, offset of mail-2 = 4756
    - mail of UID=1, 7, ... (flagged \Deleted) in IMAP folder
      were not shown with strike-thru line.
    - mail of UID=9999(flagged \Deleted) in an IMAP folder
      was shown with strike-thru line.
(b) Single mail only in POP3 account's folder, compacted.
    The single mail's offset = 0
    - mail of UID=1(flagged \Deleted) in IMAP folder
      was shown with strike-thru line.

Because of (b), empty or "single mail only & compacted" local mail folder doesn't affect on this bug's problem.
It looks that (a) means "highest ID in newsgroup/local mail folder" is relevant to strike-true line of deleted mail in IMAP folder.
I did some additional check with different combination of IMAP folders and local mail folders. Phenomenon looks next for me now;
  If IMAP mail's UID is highest ID in virtual folder,
  and if "Just mark it as deleted" is selected for IMAP account who owns
        IMAP folder which contains the IMAP mail of highest ID,
    mail of \Deleted flag in an IMAP folder is shown with strike-line,
  Otherwise,
    mail of \Deleted flag in an IMAP folder is not shown with strike-line.
Summary: deleted messages in search folder not showing deleted, when multiple mails/articles of same ID(==Order Received value) exist in a search folder, and when IMAP mail is deleted with IMAP delete model of "Just mark it as deleted" → deleted messages in search folder not showing deleted, when mail/article of highest "Order Received" value in search folder is not mail in IMAP folder which is owned by IMAP account who uses IMAP delete model of "Just mark it as deleted"
FYI.
This bug easily occurs if next conditions exist in user's environment.
  - User uses "Unified Folders" view at folder pane.
    - Folder of "Local Folders" is always included in search target.
    - ID("Order Received" column value) is offset in local file if local mail
      folder. So, highest ID is usually offset in local mail folder.  
  - User uses IMAP delete model of "Just mark it as deleted".
  - User uses ordinal IMAP server(mail of \Deleted flag is kept in folder),
    or user uses Gmail IMAP but disables automatic-expunging of Gmail IMAP
    by "Advanced IMAP Controls" of Gmail's Labs(Gmail IMAP behaves as if
    ordinal IMAP server as for \Deleted flag).
As "delete of old draft mail" occurs upon each "Save As Draft", this bug can frequently be seen on Drafts of "Unified Folders" view. And, this bug's phenomenon with above conditions is same as "old draft mail is not deleted" for general user.
I hope general users who use Tb with above conditions won't increase number of bugs for phenomenon of "Old draft mail is never deleted after Save As Draft".
(In reply to comment #10)
> I will keep an eye on that ID value when I am seeing this problem.

Please keep eye on "Account" column in addition to "Order Received" column.
I guess that "highest Order Received colum value" is never UID of a mail in IMAP folder  of an IMAP account for which "Just mark it as deleted" is selected, when you see this bug's problem.
So, I have messages in my summary pane right now that are deleted but not "strikethrough".  I have both the Order Received and Account columns in the summary pane visible and I changed the sort to sort on the Order Received column, descending.

The top item in the list is an IMAP message.
(In reply to comment #15)
> The top item in the list is an IMAP message.

What is IMAP delete model of the account who owns the top item mail in his IMAP folder?
In my quick check, I could see this bug when owner of the top item is IMAP account whose IMAP delete model is not "Just mark it as deleted".
(In reply to comment #16)
> 
> What is IMAP delete model of the account who owns the top item mail in his IMAP
> folder?

All of my IMAP accounts are always "just mark deleted".

> In my quick check, I could see this bug when owner of the top item is IMAP
> account whose IMAP delete model is not "Just mark it as deleted".

I'm not sure what kind of correlation this is proposing.

I was just reporting that I can observe this "no strikethrough of deleted message" behavior even when the highest UID is that of an IMAP message in a folder that is set to "just mark deleted".
(In reply to comment #17)
> > In my quick check, I could see this bug when owner of the top item is IMAP
> > account whose IMAP delete model is not "Just mark it as deleted".
> I'm not sure what kind of correlation this is proposing.
> 
> I was just reporting that I can observe this "no strikethrough of deleted
> message" behavior even when the highest UID is that of an IMAP message in a
> folder that is set to "just mark deleted".

Oh, sorry for my ambiguous question.
I simply wanted to know whether my assumption of comment #12 is correct or not.

> I was just reporting that I can observe this "no strikethrough of deleted
message" behavior
> even when the highest UID is that of an IMAP message in a folder that is set to "just mark deleted".

It's never "just reporting". It's valuable.
Your observation indicates that my assumption of comment #12 is not correct.
I'll do additional checks to know mandatory conditions which are needed to produce this bug's problem, before ask developers to analyze this bug.

Thanks a lot again for your co-operation, for providing valuable data based on your check result very quickly.
Please note that it's very hard to obtain valuable information from bug opener of *bug* at B.M.O in many cases.
For example;
I needed very long time to get answer from bug opener even about "whether Unified Folders view is used or not in bug opener's environment" and "whether Just mark it as deleted model is used or not in bug opener's environment" in Bug 618553.
 - I asked about them on 2010-12-14 in Bug 618553 Comment #9.
 - I could get answer for "used IMAP delete model in bug opener's environment"
   on 2011-03-01 by Bug 618553 Comment #31 from bug opener of that bug.
 - I could get answer for "whether Unified Folders view is used or not"
   on 2011-03-01 by Bug 618553 Comment #34 from bug opener of that bug.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.