Closed
Bug 1312172
Opened 9 years ago
Closed 9 years ago
Changing between "match all of" and "match any of" fails for rules that are not visible. Then filter might fail.
Categories
(MailNews Core :: Filters, defect)
MailNews Core
Filters
Tracking
(thunderbird51 fixed, thunderbird52+ fixed, thunderbird53 fixed)
RESOLVED
FIXED
Thunderbird 53.0
People
(Reporter: wsmwk, Assigned: aceman)
References
Details
(Whiteboard: [filterfails])
Attachments
(1 file, 1 obsolete file)
3.00 KB,
patch
|
jorgk-bmo
:
review+
jorgk-bmo
:
approval-comm-aurora+
jorgk-bmo
:
approval-comm-beta+
|
Details | Diff | Splinter Review |
Discussed with aceman on IRC.
steps
1. Have a filter whose list of rules exceeds the size of the window, resulting in scroll bar
2. change from Match All to Match Any
3. close filter
4. look at msgfilterules.dat
result
1. only those rules that were visible in the UI got changed to the OR condition. the rules which were not visible have AND condition
2. filter fails
perhaps a regression?
I don't think it is a regression. It seems to me this is caused by the mechanism of "uninitialized rules" in the filter editor. Rules that are off-screen (scrolled away from view) are not initialized into the proper objects. There is an object holding the rules, but there is a strange mechanism where it only initialized (pulls in) rules into itself that are actually touched or made visible.
I'm not sure if that is a perf feature or what.
I'd like to ask Kent if the resulting "buggy filters" are actually evaluated literally, as they get stored.
After the bug happens, the msgfilterrules.dat file contains rule definitions like this:
condition="OR (subject,contains,123) OR (subject,contains,234) AND (subject,contains
,345)"
Are the rules evaluated in the backend as 2 ORs and 1 AND ? Could this be a source of some of the reports of people claiming their filters not working?
Assignee: nobody → acelists
Flags: needinfo?(rkent)
OS: Unspecified → All
Hardware: Unspecified → All
Comment 2•9 years ago
|
||
I can't answer that question without spending time diving into the code, which you could also do. So I am going to decline the invitation for now.
Flags: needinfo?(rkent)
Reporter | ||
Comment 3•9 years ago
|
||
I thought we previously encountered something when the number of items exceeded the size of the window - but I'm not finding such a bug report.
Summary: Changing between "match all of" and "match any of" only partly works, and filter fails → Changing between "match all of" and "match any of" fails for rules that are not visible. Then filter might fail.
Wayne, can you try this?
Can you also determine whether the change of the bool operators make a difference? I.e. the broken mixed operators make the filter not hit on your message set, but the fixed operators (all OR or all AND) work?
Attachment #8806494 -
Flags: feedback?(vseerror)
Reporter | ||
Comment 5•9 years ago
|
||
Comment on attachment 8806494 [details] [diff] [review]
WIP patch
Thanks. All cases work great with the patch, including "ALL" which indeed fails without the patch.
Attachment #8806494 -
Flags: feedback?(vseerror) → feedback+
Reporter | ||
Updated•9 years ago
|
Product: MailNews Core → Thunderbird
Comment on attachment 8806494 [details] [diff] [review]
WIP patch
Thanks.
Attachment #8806494 -
Flags: review?(mkmelin+mozilla)
Comment 7•9 years ago
|
||
Comment on attachment 8806494 [details] [diff] [review]
WIP patch
Review of attachment 8806494 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM, the second hunk (cosmetic) don't apply though. r=mkmelin
Attachment #8806494 -
Flags: review?(mkmelin+mozilla) → review+
![]() |
||
Comment 8•9 years ago
|
||
Now it applies ;-)
Attachment #8806494 -
Attachment is obsolete: true
Attachment #8826317 -
Flags: review+
Comment on attachment 8826317 [details] [diff] [review]
1312172.patch
Thanks for finishing it.
I was just about to fix this, as I noticed the last line has now changed to searchTerms.replaceElementAt() in the file :)
![]() |
Assignee | |
Comment 10•9 years ago
|
||
I suspect this bug may be the reason of some more bug reports claiming filters are not applied to messages that should be matched. Users toggling the "any of" and "all of" the rules in the filter in the past may have damaged the filter so that it now has mixed AND/OR operators in the msgFilterrules.dat file (see comment 1).
Once this bakes on trunk, we should consider it for uplifting to 52.
I CC our great bug triagers to be aware of this fix and method of diagnosing some of the bug reports (have the user check the AND/OR strings in the msgFilterrules.dat file). The proper format of a filter must always have either all operators being AND or all of them being OR.
![]() |
||
Comment 11•9 years ago
|
||
Would you like this landed?
![]() |
||
Comment 13•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-thunderbird51:
--- → affected
status-thunderbird52:
--- → affected
status-thunderbird53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 53.0
![]() |
||
Updated•9 years ago
|
Keywords: checkin-needed
![]() |
||
Comment 14•9 years ago
|
||
Comment on attachment 8826317 [details] [diff] [review]
1312172.patch
(In reply to :aceman from comment #10)
> Once this bakes on trunk, we should consider it for uplifting to 52.
I think "trunk baking" is over-estimated since most regression only get detected on ESR :-(
This change doesn't look like it would cause a whole lot of trouble, but one never knows.
Attachment #8826317 -
Flags: approval-comm-beta+
Attachment #8826317 -
Flags: approval-comm-aurora+
![]() |
||
Comment 15•9 years ago
|
||
![]() |
||
Comment 16•9 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•