Closed Bug 59821 Opened 24 years ago Closed 19 years ago

Backend support for complex boolean algebra in mail filters

Categories

(MailNews Core :: Filters, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 171073
Future

People

(Reporter: mpt, Assigned: sspitzer)

References

(Blocks 2 open bugs, )

Details

Mozilla should allow full boolean mail filters -- that is, filters where `all of 
the following'-type and `any of the following'-type groups of criteria can be 
nested to any level, rather than the rather inflexible single-level arrangement 
we have now.

Once this is implemented, I'll file a breadcrumb trail of bugs for changing the 
current filter GUI to one which can be used to specify full boolean filters. (In 
its default appearance, this GUI would look no more complicated than the current 
one for single-level filters.)
I think this is a great idea, but there's alot of work involved.
Reassigning to bienvenu for backend work

updating the summary slightly to make it a little clearer. This is mixing "or" 
and "and" style rules in one rule:

((Subject contains foo) and (Sender contains bar)) or (Sender contains baz)
Assignee: alecf → bienvenu
Summary: Backend support for full boolean mail filters → Backend support for complex boolean algebra in mail filters
QA Contact: esther → laurel
Blocks: 66425
Oh yes please.  Not having boolean filters makes things so difficult.
move to future.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Navin, is this really yours?
ok, reassigning to self
Assignee: bienvenu → naving
Status: ASSIGNED → NEW
Blocks: 123788
I think that bug 59821(this), and bug 59341, and bug 59339 should be marked as
dupes of bug 11037.

This bug also would require a adjustments to UI frontend for Javascript filters.
Blocks: 171458
I disagree with Comment #7 (this is not really a duplicate of bug 11037).  While
JavaScript may be the underlying mechanism for supplying this functionality, the
average user should NOT be expected to be able to code some JavaScript to
implement their own arbitrarily complex set of rules, as described in one of the
links for bug 11037).  MS Outlook does just fine (more or less) with it's
filtering abilities, and provides a pretty good UI to do it.  Whether it's well
implemented is a different story.

Perhaps an Advanced button on the Filter UI could toggle whether you use easy or
complex rules?  The Advanced Filter UI may have a button on it that spawns an
'editor' (default for system) for someone to enter some JavaScript themselves?

Is this supposed to include arbitrarily complex boolean filters like:

(Subject contains ((mouse and bird AND NOT cat) OR dog) OR (Sender contains
(tiger OR NOT((lion AND fish) OR NOT rat)))) AND (Body contains ("eat once per
day" OR NOT "eat twice per day"))  ?

I understand that JavaScript can easily handle that, but a good UI will make it
all nice and pretty and simple for us dumb users..
Ignore Comment 8.  Adding a good UI to be able to implement the changes here for
us dummies should be a separate RFE once this bug is closed (assuming JavaScript
is the answer).
mass re-assign.
Assignee: naving → sspitzer
If one wanted to do something truly powerful and eliminate the need to specify
paratheses for complex boolean expressions, consider allowing people to specify
a complex filter using RPN. 
*** Bug 225375 has been marked as a duplicate of this bug. ***
*** Bug 211103 has been marked as a duplicate of this bug. ***
Product: MailNews → Core
(In reply to comment #0)
> Mozilla should allow full boolean mail filters -- that is, filters where `all of 
> the following'-type and `any of the following'-type groups of criteria can be 
> nested to any level, rather than the rather inflexible single-level arrangement 
> we have now.

I don't know how long it's been there, but the backend certainly supports this
now. All that's needed now is the UI.
This function was resolved in bug #171073 quite a while ago.

*** This bug has been marked as a duplicate of 171073 ***
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.