RealRaven2000 / quickFilters

Thunderbird Add-on: quickFilters
http://quickfilters.quickfolders.org/
Other
50 stars 11 forks source link

CustomTemplates with many issues #103

Closed SchreinerK closed 2 years ago

SchreinerK commented 2 years ago
  1. New Template is grayed out and can not be ussed. But Edit is not. > Inconsistent. image
  2. Click on Edit opens the Filter dialog, but in wrong place. Expected "Local Folder" image
  3. Creating a new filter with "quickFilterCustomTemplate title" it is detected as template. but on using it there is a error message. expected "quickFilterCustomTemplate:title". > inconsistent rules
  4. Creating a template with workaround above errors und using it will not be as expected. image image Some conditions are missing, some variables are not replaced.
  5. The Sort button is missing in a template

Has no one used or tested this before or am I the only one getting these errors? Version 5.4 (from 9.5.2022) Trial period

LOL Sort button does not work (no license). I think almost nothing of this above should work w/o license. It's just a coincidence or a bug that I have come too far at all ;-)

RealRaven2000 commented 2 years ago

What version of Thunderbird are you using? By the way you may have found 2 bugs, that should be in separate issues - I will indicate below.

  1. New Template is grayed out and can not be ussed. But Edit is not. > Inconsistent.

You definitely need a Pro license to create new custom templates. I should probably add a (?) help panel to explain this

  1. Click on Edit opens the Filter dialog, but in wrong place. Expected "Local Folder"

works for me - so I can't reproduce that - even without license, it opens Local Folders:

image

Do you get any messages in error console? (Ctrl+Shift+J)

  1. Creating a new filter with "quickFilterCustomTemplate title" it is detected as template. but on using it there is a error message. expected "quickFilterCustomTemplate:title". > inconsistent rules

You're hacking it - when you generate a filter the supported way it will be with a colon followed by a space, like in the screenshot above - this is taken care of automatically when you click [Create New]. If you want a free test license send me an email so I can give you one!

  1. Creating a template with workaround above errors und using it will not be as expected. image image Some conditions are missing, some variables are not replaced.

this one needs to be looked into, not sure if this is license related but I doubt it. Once I have sent you a license, please test again and please raise a separate issue!

  1. The Sort button is missing in a template

It's not so important there - I expect users to have 2 or 3 search terms in there. Templates are for making multiple new filters, surely you wouldn't want a really long search terms list in all of them?

Has no one used or tested this before or am I the only one getting these errors? Version 5.4 (from 9.5.2022) Trial period I haven't tested this lately with 101 beta3.

LOL Sort button does not work (no license). I think almost nothing of this above should work w/o license. It's just a coincidence or a bug that I have come too far at all ;-) Seems license related - but is expected to work without license. I have raised issue #104 for this one. See my speculations of why & how + a fixed version there.

SchreinerK commented 2 years ago

What version of Thunderbird are you using?

I use TB 91.9.0

  1. Click on Edit opens the Filter dialog, but in wrong place. Expected "Local Folder"

after more investigation: if you press "Edit..." when the filter dialog is already open then the location is not changed. And the "Message Filter" dialog is always open bevor going to Settings end press Edit ;-) If I open the settings and then close the filter dialog bevore I press Edit, then the location is changed to "Local Folder". but manual closing beforehand is cumbersome.

After buying a licence, same behavior with "Edit "but "New Template" creates the template in "Local Folder"

Do you get any messages in error console? (Ctrl+Shift+J)

  1. Creating a new filter with "quickFilterCustomTemplate title" ...

no it is a message box bevor the filter selction dialog is opened. image No I did not hack the app with error console, the app gave me all information voluntary to create a new filter. ;-)

  1. Creating a template

same behavior also with license. some entries disapear. image image

and also with realistic use case I need to create image image the second is the filter not the template (even if seems so). one filter lines disapears (%from(mail)%), one variable ist not replaced (%subjectRegex()%).

RealRaven2000 commented 2 years ago

What version of Thunderbird are you using?

I use TB 91.9.0

  1. Click on Edit opens the Filter dialog, but in wrong place. Expected "Local Folder"

after more investigation: if you press "Edit..." when the filter dialog is already open then the location is not changed. And the "Message Filter" dialog is always open bevor going to Settings end press Edit ;-) If I open the settings and then close the filter dialog bevore I press Edit, then the location is changed to "Local Folder". but manual closing beforehand is cumbersome.

even worse: it filters for the custom templates in the current server, which makes it look as though all filters there were erased:

image

    let win = util.getMail3PaneWindow(),
        localFolder = util.getMsgFolderFromUri('mailbox://nobody@Local%20Folders'),
        qF = win.quickFilters;  
    qF.Worker.openFilterList(true, localFolder, null, null);

Apparently the localFolder argument doesn't switch the account in this case for some reason.. Here is a quickfix version: quickFilters-wx-5.4.1pre53.zip

  1. Creating a template

same behavior also with license. some entries disapear.

I will run some tests on that later.

and also with realistic use case I need to create image image the second is the filter not the template (even if seems so). one filter lines disapears (%from(mail)%), one variable ist not replaced (%subjectRegex()%).

Again, need to test for that one - maybe %subjectRegex()% expects a string argument (a regular expression designed to extract a string from the email you use in assistant) - try this one:

%subjectRegex(\[.*\])%

this will filter out a tag from a subject just as "[quickFilters] issue 103 - CustomTemplates with many issues" - it will extract "[quickFilters].

As regards dropping the from address: Just happened to me as well when I was testing. it's actually by design (and may be a bad rule for complex templates or custom templates in general). quickFilters drops your own Email address condition for "from" to avoid problems when you filter out bulk mail or threaded conversations - you usually / don't want to include your own email addresses when filtering a group of senders in a thread - because it would cause ALL your emails being grabbed by the filter. So test with an email from a third party and it will work as expected.

RealRaven2000 commented 2 years ago

By the way: I cannot close this bug in any meaningful way because you reported multiple issues, so I cannot close using the comment "works as designed" (which applies to sub-issue number 4). I believe I fixed the other thing that came up in your latest comment:

"if you press "Edit..." when the filter dialog is already open then the location is not changed. And the "Message Filter" dialog is always open bevor going to Settings end press Edit ;-) If I open the settings and then close the filter dialog bevore I press Edit, then the location is changed to "Local Folder". but manual closing beforehand is cumbersome."

It's a bad idea to have a single bug for a bunch of stuff.

As regards silently dropping own email addresses, is there any way this could be improved? I would be willing to open a new issue for that one in order to improve it if you can give me some examples / suggestions...

SchreinerK commented 2 years ago

Off-topic: No one forbids you to split the issue and create a separate entry for each bug, if it is necessary to manage it separately. For me it was only one operation "create template" ;-) I can't really know what is a new bug and what depends on others. For the next time where something like this happens, you could answer in separate issue which refer to the original. Just a thought :-) IMHO you can close this issue. For the issues which are still open and you want to work on, you can create a new issue. For the future I will create more separated issues. Thanks for you work and your quick response.

RealRaven2000 commented 2 years ago

Off-topic: No one forbids you to split the issue and create a separate entry for each bug, if it is necessary to manage it separately. For me it was only one operation "create template" ;-) I can't really know what is a new bug and what depends on others. For the next time where something like this happens, you could answer in separate issue which refer to the original. Just a thought :-) IMHO you can close this issue. For the issues which are still open and you want to work on, you can create a new issue. For the future I will create more separated issues. Thanks for you work and your quick response.

thanks will do - I am just afraid I might lose some valuable information if I close an omnibus bug like this. Do you think there is merit in improving the "silent" email address dropping in some way? should there be a message "removed email addresses a,b,c from condition to avoid problems"? At the moment this is just coded for simplicity and safety. Should the feature be disabled for custom templates to avoid coming across as broken?

SchreinerK commented 2 years ago

Do you think there is...

I have to work more with this. I let you know all bugs and suggestions (in separate issues ;-) At the moment I am running out of time, I have already spent too long on it today.

RealRaven2000 commented 2 years ago

Do you think there is...

I have to work more with this. I let you know all bugs and suggestions (in separate issues ;-) At the moment I am running out of time, I have already spent too long on it today.

that's alright - if you need help making a regular expression for extracting text from your subject you can reach out to me directly. Thanks for all your input, and getting a license!

RealRaven2000 commented 2 years ago

To remove some confusion, I added a little tooltip button:

image

RealRaven2000 commented 2 years ago

just released version 5.5, addressed the following issues (so far)

1 - New Template is grayed out and can not be used - addressed with help panel (see previous comment) 2 - Edit now opens in Local Folders (even with no Pro license present) 3 - I think this is because of the "faulty" title (insert space after ":" ) WONTFIX 4 - silently dropping "own" email parts - I have opened a new issue #106 for planned improvements, please discuss / comment there 5 - missing sort button in custom template - please make a new issue / feature request if you think it is important 6 - if you press "Edit..." when the filter dialog is already open then the location is not changed. - please add a new separate issue and add detail there.