Closed Bug 477254 Opened 15 years ago Closed 15 years ago

Saved Search with Match All Messages does not persist

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b3

People

(Reporter: bc, Assigned: rkent)

References

Details

(Keywords: regression)

Attachments

(1 file)

Steps to reproduce:

1. Create a Saved Search
2. Set the Search to search over multiple folders. These can be subscriptions, news groups, or a mix of folders across accounts.
3. Set the search criteria to match all messages.

Expected results:

The match all message setting persists.

Actual results:

The search criteria changes from match all messages to Match any of the following with Subject containing....

fyi, error console messages:

Warning: Timed textboxes are deprecated. Consider using type="search" instead.
Source File: chrome://messenger/content/messenger.xul
Line: 0

Error: this.indexer is undefined
Source File: file:///Applications/Shredder.app/Contents/MacOS/modules/gloda/indexer.js
Line: 1899

I do have the message indexer enabled, but this problem predates it.

Error: uncaught exception: [Exception... "Component returned failure code: 0x80550006 [nsIMsgFolder.msgDatabase]"  nsresult: "0x80550006 (<unknown>)"  location: "JS frame :: chrome://messenger/content/mailWidgets.xml :: parseFolder :: line 1928"  data: no]
Flags: wanted-thunderbird3?
Bob, which build are you running?
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090206 Shredder/3.0b2pre
"term=ALL" in virtualFolders.dat was changed to "terms=OR (subject,contains,)".
1. Create a virtual folder with "match all messages" => term=ALL
   => Hit mails are displayed in virtual folder
2. View folder property => "match all messages" is chosen in display => OK
   => terms=OR (subject,contains,) => Hit mails disappear
3. View folder property => "match any of the following" is chosen
   => change to "match all messages" => OK => term=ALL
   => Hit mails are displayed again
   Note:  No warning was issued upon click of OK when;
            "match all of the following" or "match any of the following",
            and "Subject contains" with null string
Above virtualFolders.dat corruption was observed with 1/26 build & 2/06 build. (Didn't check with older builds)
Above phenomenon was observed with Tb trunk 2008/7/10 build.
> version 3.0a2pre (2008071003)
Problem doesn't occur with Tb 2.0.0.19. Difference between Tb 2 and Tb trunk;
 Tb 2  : Row for condition is not displayed when "match all messages".
 Trunk : A row for condition(Subject/contains/null, which is grayed out)
         is displayed, when "match all messages" is displayed as current choice.
Regression by change that displays the "grayed out row"?
Problem exists since initial landing of patch for Bug 351445. 
> version 3.0a1pre (2007072305) : No problem (no row of grayed condition)
> Bug 351445 was changed to FIXED on 2007-07-23 18:37:11 PST.
> version 3.0a1pre (2007072405) : Problem started to occur.
FYI. Problem occurs on Seamonkey Trunk too. MailNews Core issue.
> Build identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.9.1b3pre) Gecko/20090203 SeaMonkey/2.0a3pre
OK this bit me, so let me take this.

My behaviour (trunk on Windows) is slightly different. Match All Messages persists unil I another another filter action, then it is not saved. However, I have had the symptom on filters where I don't believe I did that. Yet to reproduce, I need to add a filter action to an existing filter.
Assignee: nobody → kent
(In reply to comment #7)
> However, I have had the symptom on filters where I don't believe I did that.
> Yet to reproduce, I need to add a filter action to an existing filter.

As you say, it was not search-folder-only issue. Phenomenon of comment #3 was observed also on "message fileter"/msgFilterRules.dat with Tb trunk. But I couldn't see msgFilterRules.dat corruption by "adding new filter rule" or by "Run filters on folder". You did following, didn't you?
  View the filter rule via Edit, and close panel by X button, instead of "Cancel".
I'm going to add a patch, but let me clarify the STR that I am going to fix.

1. In Local Folders, create and save a new filter All:

  Search: MatchAllMessages  Perform These Actions: AddStar

2. In the filter list, select the new filter All and edit
3. add a new action, to Mark As Read, and save the filter.
4. In the filter list, select the new filter All and edit

Expected result: filter shows Match All as the search criteria
Actual result: filter shows Match Any of the Following / Subject contains (blank)
Attached patch the fixSplinter Review
This fixes my problem. I developed this by following the analogy of the booleanAnd handling, but I never traced out the details of why the adding of a new filter action causes this problem to happen. I'm hoping the fix is simple and obvious enough that I don't need to.
Attachment #363912 - Flags: superreview?(bienvenu)
Attachment #363912 - Flags: review?(bienvenu)
I would appreciate any comments about whether the STR in comment 9 is, in fact, the bug that the reporter is reporting. WADA seems to get slightly different behaviour, which I don't understand.

To answer WADA's question, when I save the filter rule, I press the OK button and not Cancel.
Status: NEW → ASSIGNED
Whiteboard: [needs r/sr bienvenu]
Target Milestone: --- → Thunderbird 3.0b3
OS: Mac OS X → All
Hardware: PowerPC → All
Attachment #363912 - Flags: superreview?(bienvenu)
Attachment #363912 - Flags: superreview+
Attachment #363912 - Flags: review?(bienvenu)
Attachment #363912 - Flags: review+
Comment on attachment 363912 [details] [diff] [review]
the fix

makes sense, thx for the patch. I checked this in.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [needs r/sr bienvenu]
Unable to reproduce problem with Tb trunk 2009/3/09 win32 build. VERIFIED on Win.
Flags: wanted-thunderbird3?
Blocks: 351445
Keywords: regression
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: