Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support combined "any" / "all" filters with mail clients that do (Betterbird 91.8) #102

Open
RealRaven2000 opened this issue May 2, 2022 · 4 comments

Comments

@RealRaven2000
Copy link
Owner

The new version of Betterbird will support filters that allow mixing nested search conditions in which the operators "any" (OR) and "all" (AND) are supported, such as this:

image

@RealRaven2000 RealRaven2000 self-assigned this May 2, 2022
@RealRaven2000
Copy link
Owner Author

this means that certain things need to be reviewed:

  1. The "Sort search terms" function needs to be redesigned - we cannot assume all search terms are in the same group because it will destroy the logic of the filter if they are re-ordered. sorting could be done within a simple subgroup (like 2 groups shown in the example above) but even then care must be taken because the parentheses (beginsGrouping / endsGrouping) are stored in the first / last term of each group and not separately. This means if the first / last item are reordered then beginsGrouping / endsGrouping have to be transferred to the first / last item in the grouped list of conditions. At the beginning I suggest we disable sorting for any more complicated filter expression
  2. make sure we do not lose information when storing filters. I assume this should be alright as no new attributes have been added.
  3. The trouble-shooter will currently flag filters that have mixed (any + all) operators. This test needs to be disabled for mail clients which have the option of using mixed operators.
  • How to determine securely whether the mixed operator is supported?
  • in the patch written by Joerg K, 2 dummy attribute / functions have been removed. For now, we can use this as sign for the new functionality being supported. The hope is that if Thunderbird (ever) merges the changes they should adopt this part of the patch as well. I pan to use the absence of the dummy function nsMsgFilter.addTerm() to know that mixed / complex search terms are supported.

Betterbird github issue: Betterbird/thunderbird-patches#35

Here is the relevant patch with initial number of significant changes.

@ThiloteE
Copy link

ThiloteE commented Jun 12, 2022

Just for the record: There have been further related changes to Betterbird in:

Quickfilters most significantly will be affected by Betterbird/thunderbird-patches#62 (comment)

@ThiloteE
Copy link

Has this been solved or is it still on the to do list?

@RealRaven2000
Copy link
Owner Author

Has this been solved or is it still on the to do list?

I support creating filters and custom filter templates, also backup and restore. Merging is still an open question.

@RealRaven2000 RealRaven2000 changed the title Support mixed "any" / "all" filters with mail clients that do (Betterbird 91.8) Support combined "any" / "all" filters with mail clients that do (Betterbird 91.8) May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants