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
Boolean Filter Rules: Adding 2nd and 3rd level groups can cause open brackets (and thereby move 1st level rules to the 2nd level) #62
Comments
We can reproduce the issue. The msgFilterRules.dat has the correct content:
The bracket at "d" closes two groups, that's by design. Remember that the condition tree is flattened into a list of terms and the terms carry a begin/end group. And obviously the flag can only be set once, even if two groups end on the term. In the debug it looks like this:
Sadly when this is restored, the "e" condition shifts from level 1 to level 2 since the double-end is not taken into account. The rule execution should still work as long as you don't edit the group again. This is a tricky one. |
We're working on it. The design will be changed to balance the brackets, so
Note the double bracket after "d". Expect a fix in the news few days. |
The following cases work now with the latest commit:
The case from #62 (comment) doesn't work yet. |
@RealRaven2000: Please note that significant changes are being implemented here. Most prominently, we're changing |
…ps), fixed multi-begin at term. Final.
The latest commit also fixes this case where many groups begin at the same term:
|
Thanks for the heads up. Indeed quickFilters main business is creating filters (so far I don't think I set beginsGrouping during filter generation, but it's definitely important for its backup / restore / copy / paste features). In a nutshell - the idea of the quickFilters assistant is auto-filling thinks like folder target or from address based on emails moved / tagged; so it needs intimate knowledge of the internals of a filter. Can I use "typeof beginsGrouping" to determine patch state? |
Well, if you don't create groups in quickFilters, then you wouldn't be setting {begins|ends}Grouping on the |
Thanks for the example! I will find a way to do this - even though my current filter templates don't create groups, users are allowed to generate their own templates and thus can add groupings. Merging new rules into existing filters is going to be challenging, [this adds more search terms to existing filters and will need to detect the correct new position - e.g. at the end of a group with matching search conditions, such as "from contains" with |
@ThiloteE: The latest build at https://www.betterbird.eu/downloads/get.php?os=linux&lang=en-US&version=latest should fix the issues you reported and the ones I discovered myself. I discovered more issues: Deleting a term or group out of the middle of a complex expression do not (yet) adjust the counts of beginning/ending groups, so deletion in complex situation will likely cause invalid rules. We filed issue #63 for that. |
Thank you :-) I will do some testing eventually. In some days / weeks. |
Positive Feedback: I have now used BB 91.10 for ~ 6-7 weeks with some "simple" complex filter rules on my main machine and have not noticed any other bugs (apart from #63) so far. Hooray :) Today I have finally made the jump to BB 91.12.0 |
Thanks for the feedback. |
Follow up to #35 and #60.
I did some tests using the linux build you sent me here (91.10.0-bb33 (64-bit) and stumbled upon this.
How to reproduce:
2022-06-10.16.20.44.2.ALL.3.ANY.for-github.mp4
2022-06-10.16.55.27.2.ANY.3.ALL.-.for.github.mp4
The text was updated successfully, but these errors were encountered: