Message Filter rules not executed in sequence order
Categories
(Thunderbird :: Filters, defect)
Tracking
(Not tracked)
People
(Reporter: tom-github, Unassigned)
Details
Attachments
(1 file)
21.70 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Steps to reproduce:
Create filters A, B, C, D, and E in that order. Filter E is set to 'Before Junk Classification', the rest as 'After Junk Classification'. The Message Filter list shows them in the order created, and states that that is the order they will be run in.
Actual results:
The filter E (with the 'Before Junk Classification' option) is executed before the earlier filters.
Expected results:
My suggestion would be to break the filter list into two sections (before and after junk classification), and then sort them in each of those sections. Barring that, re-order the list based on the actual execution order (and don't allow 'Befores' to be moved lower than 'Afters').
Comment 1•2 years ago
|
||
TCW, can you reproduce this?
Comment 2•2 years ago
|
||
I need a little bit more info to repro this. The STR, IMHO, are only 20% of the picture to me. I get the A through E parts and that E is the only filter set to "Before Junk Classification" and the rest are "After Junk Classification."
- What are the "Matching..." bullets set to?
- Contains, Doesn't Contain? Is? Isn't? What are we setting this drop-down menu to?
- Subject, From, Body, Date, etc.? What are we setting this drop-down menu to?
- What is the "Perform these actions" drop-down menu set to?
- What is the Target Folder set to?
You can't just create filters per the STR and not set all the other options as well. They are mutually inclusive and TB will complain that it needs them set or it won't create the filter.
@tom-github, can you give me something more to work with here so I can repro? Can you take a screenshot of how you currently have it set up so I can create a filter setup---exactly as you have it---which is failing? I can't interpolate what the other necessary settings need to be to create the A through E filters.
Reporter | ||
Comment 3•2 years ago
|
||
The triggers and actions are not really relevant, but for example, for rules A to D the triggers could be a simple 'If subject contains' a key word, and the action was to move the message to a folder then another action to stop processing filters. The E filter might be to check for the Body to contain a word then to delete the message and stop processing more filters.
The expectation from the rules would be for rules A to D to be checked and if triggered then the message moved and no more filters applied (and if no matches then E would be checked), but the reality is that E is done first and if it triggers then A to D are never done. This differs from the clear statement that rules are processeds in the listed order (because there appears to be a hidden re-sort based on the Junk classification rule). The effective order implemented in my example is
E (Due to having the 'Before Junk Classification' rule)
A
B
C
D
even though the list shown implies (and states) that E should go last.
Reporter | ||
Comment 4•2 years ago
|
||
Here is thge screen shot of the Filter config page showing the statement of execution order
Reporter | ||
Comment 5•2 years ago
|
||
In this case, if the 'GS' filter was set to run before junk classification, and the others after, then it would actually happen before the others.
Comment 6•2 years ago
|
||
Ok, so GS filter is the one that is the "Before" filter and the rest are "After" filters. Out of curiosity, what if you select the GS filter and choose the Move Up option to bring it to the top of all the others? Though I am a user and not a Dev, I am recalling some rules about Precedence (and Order of Operation, but this is not math so maybe not) from Java programming I took a decade ago and wondering if that's at play here.
<speculation>
Since I don't know the underlying filtering rules code here, I am going out on a limb and wondering if there's preference for Before or After filters at play and some subtle bug is being revealed here. I would think that based on all these filter rules you show here that TB would, by design, go from top rule to bottom rule and be matching and running the rules set up in each filter. If that really is the case, then pushing the "Before" GS filter up to the top may have an effect. If I were programming TB, I would certainly execute "Before" actions on something rather than "After" actions because "After" actions could render a "Before" action moot once it's done its deed. Thinking out loud here. Someone who knows the logic of the code here should probably be CC'ed in here and chime in.
</speculation>
Reporter | ||
Comment 7•2 years ago
|
||
From what I have observed the GS filter IS being executed first, even though the screen note and its position indicates it should be last. My guess is that this is because it is the only filter that has the 'Before Junk' attribute set. If this is the case, then the note on that screen needs to be revised, or the entire screen changed per my suggestion. If I manually moved it to the start this would replicate the behavior I have seen, but this would not be the proper logic to handle my rules.
Comment 8•2 years ago
|
||
Reporter, do you still see this issue when using the latest version?
What information can you add to clarify the steps to reproduce this issue?
Reporter | ||
Comment 9•2 years ago
|
||
It still is not ordering the list based on the 'Before/After' attribute, and there is no indication in the list to indicate which is selected. I have not done any tests to see if it is behaving differrently that the list order indicates with any newer versions.
Concerning descriptions, I'm not sure how I can provide more detail than I listed in the above comments.
Description
•