Closed Bug 600140 Opened 14 years ago Closed 13 years ago

'Unread' quick filter hides some unread messages (the beginning of a thread)

Categories

(Thunderbird :: Folder and Message Lists, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(thunderbird6 fixed)

RESOLVED FIXED
Thunderbird 7.0
Tracking Status
thunderbird6 --- fixed

People

(Reporter: mykaul, Assigned: opera.wang)

Details

(Keywords: testcase)

Attachments

(3 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 ( .NET CLR 3.5.30729; .NET4.0C)
Build Identifier: 3.1.4

For example, in a patch series, where there's [0/X pathes], followed by a number of patches [1..X], usually patch 0 email is hidden, even though it is unread yet. If I uncheck 'unread', I can see that email, and it is indeed unread. If I again click 'unread', it is now visible correctly - as part of the unread emails.

Reproducible: Always

Actual Results:  
Does not show all unread messages, some are hidden.

Expected Results:  
Should show all unread messages

Been happening ever since the quick filter feature came, so it's not a regression.
(In reply to comment #1)
> Does it works better in safe-mdoe
> (http://support.mozillamessaging.com/en-US/kb/Safe+Mode) ?

No, same phenomena (and the only add-on I have is Lightening)
Hum does repairing the folder makes the issue go away ? (right click on the folder -> properties -> repair )
Yaniv,

> Hum does repairing the folder makes the issue go away ? (right click on the
> folder -> properties -> repair )
Yaniv, please, could you answer to comment #3?
Whiteboard: [closeme 2011-03-25]
(In reply to comment #3)
> Hum does repairing the folder makes the issue go away ? (right click on the
> folder -> properties -> repair )

Never tried that. I usually just disable the filter. I'll try it next time it happens.
I can confirm this bug, not only 'unread' filter, actually all quick filter may have this issue.

Seems only threaded view (sort by threaded) has this issue. But not all threaded messages will, only a few thread header message will hide.

BTW, 'n messages' shown on the quick filter bar has the right number.

Repair folder doesn't help.

Thunderbird 3.1.9
unzip the file with password "thunderbird", two files, one mail box, one index.
You should know how to use it :-)

I'd like to remove this attachment once this bug fixed, as the email contains company related information.

Sorry for the inconvenience.
The test is based on Thunderbird 3.1.9, safe mode.
Whiteboard: [closeme 2011-03-25]
Keywords: testcase
This issue only happens when the following code get executed in nsMsgThreadedDBView.cpp:
        if (!(flags & nsMsgMessageFlags::Elided)) // thread is expanded
        {  // insert child into thread
        ...
        }
        else if (aParentKey == nsMsgKey_None)
        {
          // if we have a collapsed thread which just got a new
          // top of thread, change the keys array.
          m_keys[threadIndex] = newKey;
        }

Unlike other execute branch, this branch seems doesn't have code to INSERT one new line.
Don't know if it needed to INSERT one line when the tread is elided.

The file is too complicated for me to fix now ;-)
(In reply to comment #11)

> The file is too complicated for me to fix now ;-)

Can we help to make you fix it ?
OK, please assign it to me.

Can someone tell me how msgKey is calculated?
(In reply to comment #13)
> OK, please assign it to me.
> 
> Can someone tell me how msgKey is calculated?

You might want to ask on #maildev on irc.mozilla.org.
Assignee: nobody → opera.wang
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Steps to reproduce:
1. create a (local) mail folder 'foo'
2. select one thread in another folder
3. copy the non-root mail to 'foo'
4. copy the root mail to 'foo' so it has larger msgKey
5. search in mail folder 'foo' with threaded view
6. root mail is missing
Attachment #523746 - Attachment is obsolete: true
Attachment #532165 - Flags: review?(dbienvenu)
thx very much for the patch - I'll try to look at it soon.
Comment on attachment 532165 [details] [diff] [review]
use the real thread root

trying this now. For future reference, for importing into mercurial queues, it's easier for us if you do a -p1 diff, because that's what mercurial assumes...
Comment on attachment 532165 [details] [diff] [review]
use the real thread root

looks good, thx. One comment, and I can fix this myself when I land this patch, is that it's not so much the message key that's important, it's the fact that the thread root is added after the reply

+  // test bug 600140, make a thread that Reply message has smaller MsgKey

we generally add msgs in msg key order, but that's not always true.
Attachment #532165 - Flags: review?(dbienvenu) → review+
I think we might want this for TB 6, since chunked header fetching with newer headers fetched first will make imap users more likely to run into this issue.
Flags: wanted-thunderbird+
TB5 is out, can we have it in TB6?
Keywords: checkin-needed
fixed on trunk - http://hg.mozilla.org/comm-central/rev/53f62c5da9e2

Opera, if you don't have hg commit privileges, you should set check-needed keyword on bug once patch has been review+'d. Apologies on my part for forgetting to communicate this earlier.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 7.0
Comment on attachment 532165 [details] [diff] [review]
use the real thread root

checkin-needed, I should have said. I've requested comm-aurora approval for this patch, which would be required for it to make 6.0...
Attachment #532165 - Flags: approval-comm-aurora?
Attachment #532165 - Flags: approval-comm-aurora? → approval-comm-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: