Closed
Bug 574799
Opened 14 years ago
Closed 14 years ago
Quick Filter returns results but displays "No results" message when searching across Unified folders
Categories
(Thunderbird :: Search, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 5.0b1
People
(Reporter: van.lindberg, Assigned: opera.wang)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 3 obsolete files)
(deleted),
patch
|
Bienvenu
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.4) Gecko/20100608 Lightning/1.0b2 Thunderbird/3.1 ThunderBrowse/3.2.8.1
When filtering messages using the quick search/quick filter input, the correct/usual result is to
1) Show the number of found results
2) Highlight the list of messages blue if results are found, red otherwise
This works on 3.1 when searching in a distinct Inbox/folder. When searching across a unified folder, however, the total number of results is always reported in the UI as "No results" (with the attendant red highlighting) even if there are results found in one or more of the folders.
Reproducible: Always
Steps to Reproduce:
1. Set up a profile with multiple mail accounts.
2. Select a unified folder to view the messages across multiple accounts.
3. Use the "Filter these messages..." box to enter a filter criteria that should succeed.
Actual Results:
The messages are correctly filtered (i.e., the message list will show matching messages), but the total number of results will be incorrectly reported in the filter bar as "No results" and the list of messages will have the red highlighting characteristic of an unsuccessful search.
Expected Results:
The total number of results found across folders should be reported. If results are found in any folder, the result list should be highlighted blue.
Confirmed Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1, switching to Unified Folders and entering
the same search term as in All Folders with Inbox produces same results but
on red background and "No results" reported.
Tested on IMAP folder without synchronization or indexing, no duplicate.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: unspecified → 3.1
Updated•14 years ago
|
Blocks: qfasfailtracker
Comment 2•14 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12pre) Gecko/20101010 Lightning/1.0b2 Lanikai/3.1.6pre
This also happens with one account and a saved search. Using Quick filter to further filter inside a saved search will result in the described (inconsistent) behaviour. Tested on IMAP, POP, online and offline (synced). Makes no difference.
Comment 3•14 years ago
|
||
looks like a dup of 581522
Comment 5•14 years ago
|
||
Confirmed on Mozilla/5.0 (X11; Linux i686; rv:2.0b9pre) Gecko/20101227 Thunderbird/3.3a2pre
I reproduced the problem 2 ways: when doing a text search, and when using the quickfilter buttons (Unread, Starred, etc.)
Updated•14 years ago
|
Summary: Wrong result number when doing quick filter across a unified folder → Quick Filter returns results but displays "No results" message when searching across Unified folders
Assignee | ||
Comment 6•14 years ago
|
||
Not only Unified Folders, but also saved search folders. That is all folders that viewType == nsMsgViewType.eShowVirtualFolderResults
Just have quick view of the source code, seems we need to override the function GetNumMsgsInView for mailnews/base/src/nsMsgXFVirtualFolderDBView.cpp, the base class nsMsgSearchDBView's implementation is
NS_IMETHODIMP nsMsgSearchDBView::GetNumMsgsInView(PRInt32 *aNumMsgs)
{
NS_ENSURE_ARG_POINTER(aNumMsgs);
*aNumMsgs = m_hdrsTable.Count();
return NS_OK;
}
In nsMsgXFVirtualFolderDBView, m_hdrsTable is NOT used, so *aNumMsgs always be zero.
Comment 7•14 years ago
|
||
Opera how would you feel about doing a patch ? (we'll help and answer all your questions :) )
Assignee | ||
Comment 8•14 years ago
|
||
Let me first try to setup the development environment ;-)
Assignee | ||
Comment 9•14 years ago
|
||
Should I provide test case? (and I don't know how to do that)
Should I also create patch for 3.1 branch?
Attachment #527229 -
Flags: review?
Updated•14 years ago
|
Attachment #527229 -
Flags: review? → review?(dbienvenu)
Comment 10•14 years ago
|
||
(In reply to comment #8)
> Let me first try to setup the development environment ;-)
Thanks
Assignee: nobody → opera.wang
Status: NEW → ASSIGNED
Comment 11•14 years ago
|
||
thx, this patch looks like the right thing to do. But we do need to add this to the unit test for the view code - see mailnews/base/test/unit/test_nsMsgDBView.js - I think just verify that view.numMsgsInView == the number of messages we expect...
Comment 12•14 years ago
|
||
Comment on attachment 527229 [details] [diff] [review]
patch against thunderbird 3.3a3
Thx again for the patch. Clearing review request pending change to unit test.
https://developer.mozilla.org/en/Writing_xpcshell-based_unit_tests shows you how to run your changed test, but basically, you change the test, and then
cd <objdir>/mailnews/base/test
make
cd ../..
make SOLO_TEST=test_nsMsgDBView.js -C base/test check-one
Attachment #527229 -
Flags: review?(dbienvenu)
Assignee | ||
Comment 13•14 years ago
|
||
This patch fix the follow issues:
1. the 'search' view report 0 message found for view sort type is NOT threaded.
2. The 'unified' or 'saved search' view report 0 message found for view sort type is NOT threaded.
3. The 'unified' or 'saved search' view report incorrect TOTAL messages when grouped by sort and have dummy rows, it will count the dummy rows.
The patch is assume that total messages found equals to the number of 'OnSearchHit' called.
I don't know if this is OK:
+ if ( !searchSession )
+ return NS_OK; // just ignore
This is needed to prevent crash when running test case.
Attachment #527229 -
Attachment is obsolete: true
Attachment #528537 -
Flags: review?(dbienvenu)
Assignee | ||
Comment 14•14 years ago
|
||
the modified test case
Attachment #528538 -
Flags: review?(dbienvenu)
Comment 15•14 years ago
|
||
thx for the patch, this is what I landed in the following changeset: http://hg.mozilla.org/comm-central/rev/33488d593cbc
Attachment #528537 -
Attachment is obsolete: true
Attachment #528538 -
Attachment is obsolete: true
Attachment #528870 -
Flags: review+
Attachment #528537 -
Flags: review?(dbienvenu)
Attachment #528538 -
Flags: review?(dbienvenu)
Updated•14 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Updated•14 years ago
|
Whiteboard: [TB2SM: for SM 2.1]
Target Milestone: --- → Thunderbird 3.3a4
Version: 3.1 → Trunk
Comment 16•14 years ago
|
||
Sorry for the bug spam. Serge is suffering from brain fade again.
No longer blocks: TB2SM
Updated•14 years ago
|
Whiteboard: [TB2SM: for SM 2.1]
Comment 17•14 years ago
|
||
Comment on attachment 528870 [details] [diff] [review]
cumulative -p1 diff for landing
http://hg.mozilla.org/releases/comm-2.0/rev/6c0694985f97
You need to log in
before you can comment on or make changes to this bug.
Description
•