Note: There are a few cases of duplicates in user autocompletion which are being worked on.

saved searches fail for searches on x-headers

RESOLVED FIXED in Thunderbird 19.0

Status

MailNews Core
Search
RESOLVED FIXED
11 years ago
5 years ago

People

(Reporter: asa, Assigned: rkent)

Tracking

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

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

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

11 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

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

Comment 2

11 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)

Updated

9 years ago
Assignee: mscott → nobody
Component: Mail Window Front End → Search
Product: Thunderbird → MailNews Core
QA Contact: front-end → search
Version: 2.0 → 1.8 Branch
(Assignee)

Comment 3

8 years ago
I'm going to address some of the issues from bug 184490 here.
Assignee: nobody → kent
Status: NEW → ASSIGNED
(Assignee)

Updated

8 years ago
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: --- → Thunderbird 3.0rc1
Version: 1.8 Branch → Trunk
Depends on: 184490
Blocks: 519202
(Assignee)

Updated

8 years ago
Target Milestone: Thunderbird 3.0rc1 → ---
(Assignee)

Comment 4

6 years ago
Created attachment 529213 [details] [diff] [review]
Always add mailnews.customHeaders to db

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

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

Comment 6

6 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?
(Assignee)

Comment 8

5 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.
(Assignee)

Comment 9

5 years ago
Created attachment 672361 [details] [diff] [review]
Unbitrotted and modernized patch

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+
(Assignee)

Comment 11

5 years ago
Checked in https://hg.mozilla.org/comm-central/rev/5cca127781c1
Status: ASSIGNED → RESOLVED
Last Resolved: 5 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.