Closed Bug 363238 Opened 18 years ago Closed 12 years ago

saved searches fail for searches on x-headers

Categories

(MailNews Core :: Search, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 19.0

People

(Reporter: asa, Assigned: rkent)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

If I add a custom x-header to the search criteria (first dropdown in the advanced search dialog) and then search for an x-header in the advanced search dialog, it works.  If, however, I save that search as a search folder, it fails. 

Tested with IMAP, both searching the server and not. Tested on latest nightly build.
This is technically a dupe of bug 205501.
we may be able to use the work in bug 356860 to add the headers required for custom views to "mailnews.customDBHeaders", but we'd also need to change the local db search code to know how to find the custom headers from the msg hdr (basically, call getStringProperty with the lower case version of the header name)
Assignee: mscott → nobody
Component: Mail Window Front End → Search
Product: Thunderbird → MailNews Core
QA Contact: front-end → search
Version: 2.0 → 1.8 Branch
I'm going to address some of the issues from bug 184490 here.
Assignee: nobody → kent
Status: NEW → ASSIGNED
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: --- → Thunderbird 3.0rc1
Version: 1.8 Branch → Trunk
Target Milestone: Thunderbird 3.0rc1 → ---
I have mixed feelings about this patch. I am really trying to address the complaints in bug 184490, but using this current bug as a partial solution.

The downsides of this patch are:

1) It only affects messages that are downloaded after a custom header is added,
2) The size of the message db for every message is increased, as any custom header that is defined will now be added to the database for all folders.
3) It makes a lot of search code for custom headers used only rarely, as the custom headers will get added to the database.

But it largely solves the problem. AFAICT the problem only occurs for folders that do not have offline storage enabled, hence the disabling of offline storage in the test.

What do you think?
Attachment #529213 - Flags: review?(dbienvenu)
I'm probably OK with this because it only affects users who define filters that use custom headers...
Comment on attachment 529213 [details] [diff] [review]
Always add mailnews.customHeaders to db

copyright on test wants to be 2011, I believe.

double ; here
nsCString customHeaders;;

don't need LL macros here:

+        if (LL_IS_ZERO(m_receivedTime))
Attachment #529213 - Flags: review?(dbienvenu) → review+
rkent, are you game to finish this?
Sorry, somehow this fell off of my radar screen.

I suppose I should fix the nits and ask for a re-review, since it has been over a year.
I took the previous patch (which had r+ from bienvenu, but never got landed), and brought it up to date. But since it has been over a year, I figure I should get it re-reviewed.

Feel free Irving to just say land it with the existing review.
Attachment #529213 - Attachment is obsolete: true
Attachment #672361 - Flags: review?(irving)
Comment on attachment 672361 [details] [diff] [review]
Unbitrotted and modernized patch

Review of attachment 672361 [details] [diff] [review]:
-----------------------------------------------------------------

r=bienvenu,irving with the nits fixed.

::: mailnews/imap/test/unit/test_imapSearch.js
@@ +6,5 @@
> + * Derived from a combination of test_imapPump.js and test_search.js
> + * Original author: Kent James <kent@caspia.com>
> + */
> +
> +// async support 

Trailing space

@@ +249,5 @@
> +                          gIMAPMailbox.uidnext++, []));
> +  gIMAPInbox.updateFolderWithListener(null, asyncUrlListener);
> +  yield false;
> +
> +  do_check_eq(1, gIMAPInbox.getTotalMessages(false));  

Trailing space
Attachment #672361 - Flags: review?(irving) → review+
Checked in https://hg.mozilla.org/comm-central/rev/5cca127781c1
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 19.0
Depends on: 810637
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: