saved searches fail for searches on x-headers

RESOLVED FIXED in Thunderbird 19.0


13 years ago
7 years ago


(Reporter: asa, Assigned: rkent)


(Depends on 1 bug, Blocks 1 bug)

Thunderbird 19.0
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)



(1 attachment, 1 obsolete attachment)



13 years ago
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.

Comment 1

13 years ago
This is technically a dupe of bug 205501.

Comment 2

13 years ago
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


10 years ago
Component: Mail Window Front End → Search
Product: Thunderbird → MailNews Core
QA Contact: front-end → search
Version: 2.0 → 1.8 Branch

Comment 3

10 years ago
I'm going to address some of the issues from bug 184490 here.
Assignee: nobody → kent


10 years ago
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: --- → Thunderbird 3.0rc1
Version: 1.8 Branch → Trunk


10 years ago
Target Milestone: Thunderbird 3.0rc1 → ---

Comment 4

8 years ago
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)

Comment 5

8 years ago
I'm probably OK with this because it only affects users who define filters that use custom headers...

Comment 6

8 years ago
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?

Comment 8

7 years ago
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.

Comment 9

7 years ago
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 <>
> + */
> +
> +// 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+

Comment 11

7 years ago
Checked in
Last Resolved: 7 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 19.0


7 years ago
Depends on: 810637
You need to log in before you can comment on or make changes to this bug.