Closed Bug 1903685 Opened 2 years ago Closed 13 days ago

"Run filters on message" doesn't work for message in global search view-as-list synthetic folder

Categories

(Thunderbird :: Filters, defect)

Desktop
All
defect

Tracking

(thunderbird_esr153 wontfix, thunderbird160 wontfix, thunderbird161 wontfix, thunderbird162 affected)

RESOLVED FIXED
162 Branch
Tracking Status
thunderbird_esr153 --- wontfix
thunderbird160 --- wontfix
thunderbird161 --- wontfix
thunderbird162 --- affected

People

(Reporter: mozilla-sp, Assigned: welpy-cw)

Details

(Keywords: reproducible, Whiteboard: [filterfail])

Attachments

(1 file, 2 external files, 1 obsolete file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/115.0

Steps to reproduce:

  1. Create a filter "Move to github" with criteria:
  • run manually, getting new mail (before junk classification), after sending
  • ANY
    -From: contains notifications@github.com
    -Action: move to existing folder "Github" in same account
  1. Move filter to top of filter list
  2. Restart Thunderbird in Troubleshoot mode
  3. Navigate to a folder containing emails from notifications@github.com
  4. Open filters dialog and clear Filter Log, make sure it's enabled
  5. Select "Move to Github" and "run now" next to "run selected filter(s) on:" with current folder selected
  6. Open Filter Log and look at it
  7. Clear Filter log
  8. Close Filters dialog
  9. Open the Error Console
  10. Clear the Error Console and close it
  11. Do a global search for "notifications@github.com"
  12. Click "view as list"
  13. Sort list by folder
  14. Select one or multiple results from "notifications@github.com" that are not in "Github" folder
  15. Select "run filters on message" from the menu
  16. Open the Filters dialog and look at the Filter Log
  17. Open the error console and look at it
  18. Repeat this entire process several times, restarting in Troubleshoot Mode between each try.

Actual results:

In Step 6, the filter runs, all messages in current folder from "notifications@github.com" are moved to the "Github" folder, and the filter action is noted in the filter log, all as expected, confirming that the filter works.
In Step 16, nothing at all happens. Filters do not run. Selected emails are not filtered, and not moved.
In Step 17, Filter Log is seen to be completely blank.
In Step 18, The error console says:
22:03:26.443 An error occurred executing the cmd_applyFiltersToSelection command: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIMsgFilterService.applyFilters]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: chrome://messenger/content/mailCommon.js :: cmd_applyFiltersToSelection :: line 387" data: no] globalOverlay.js:102:13
goDoCommand chrome://messenger/content/globalOverlay.js:102
oncommand chrome://messenger/content/messenger.xhtml:1

Expected results:

In Step 16, the filters should have run. Emails should have been moved into the "Github" folder.
In Step 17, the filtering should have been noted in the filter log.
In Step 18, there should have been no error noted in the error console produced by trying to filter one or multiple messages.

The result was the same in several different tries, with a Thunderbird restart in Troubleshoot mode between each one.

Component: Untriaged → Filters
OS: Unspecified → macOS
Hardware: Unspecified → x86_64
Whiteboard: [filterfail]

Just an idea: Maybe the global search index hasn't been updated yet to account for messages that were already moved to the "github" folder? I would suggest to try a restart/reindexing inbetween. Can you confirm the messages that were found by global search and trigger the error are in fact outside of the github folder?

Summary: "Run filters on message" doesn't do anything at all → "Run filters on message" doesn't do anything at all when using with global search
Summary: "Run filters on message" doesn't do anything at all when using with global search → "Run filters on message" doesn't work for message in global search view-as-list synthetic folder

Can reproduce on win10-64bit in
TB 115.6.1
TB 130.0a1 (2024-07-18)

Run filters on message doesn't seem to work at all for messages in global search > show results as list

my steps to reproduce

  1. tools ► message filters ► new with these options:
    • apply filter when: [x] manually run
    • ⦿ match all messages
    • perform these actions ► add star
  2. select message in INBOX
  3. tools ► run filters on message
  4. CTRL+K (global search) ► enter search term
  5. click onshow results as list
  6. tools ► run filters on message

actual results

step 3: star is added (expected)
step 6: star is not added (bug)

Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: reproducible
OS: macOS → All

Does this still reproduce when newer version?

Flags: needinfo?(mozilla-sp)
Flags: needinfo?(chrizilla)

So this is really feasible, without side effects?

Flags: needinfo?(mozilla-sp)
Flags: needinfo?(h.w.forms)
Flags: needinfo?(chrizilla)

(In reply to Wayne Mery (:wsmwk) from comment #5)

So this is really feasible, without side effects?

I mean, not feasible?

(In reply to Wayne Mery (:wsmwk) from comment #6)

(In reply to Wayne Mery (:wsmwk) from comment #5)

So this is really feasible, without side effects?

I mean, not feasible?

I guess this wouldn't be a trivial change. The question is how much effort we want to put into nsMsgXFVirtualFolderDBView and nsMsgSearchDBView now that Panorama is on its way.

Flags: needinfo?(h.w.forms)
Attachment #9485741 - Attachment is obsolete: true
Assignee: nobody → h.w.forms
Severity: -- → S4
Status: NEW → ASSIGNED
Hardware: x86_64 → Desktop
Version: Thunderbird 115 → 3.0

Use the selected messages' real folder for filtering and error reporting.
Allow one selected message in any view, and restrict multiple-message filtering
to single-folder views.

Add browser coverage for real folders, saved searches, synthetic views, and
message tabs, including selection of the correct account's filters.

Disable Run Filters on Folder for virtual folder views, including single-folder
saved searches, rather than passing a virtual folder to the filter service.

Cover disabled command state in saved searches and synthetic results, and
verify real-folder filtering still processes unselected messages.

Attachment #9675380 - Attachment description: WIP: Bug 1903685 - Fix manual filtering of selected messages in search views. r=#thunderbird-reviewers → Bug 1903685 - Fix manual filtering of selected messages in search views. r=#thunderbird-reviewers
Attachment #9675381 - Attachment description: WIP: Bug 1903685 - Disable folder-wide filtering in saved searches. r=#thunderbird-reviewers → Bug 1903685 - Disable folder-wide filtering in saved searches. r=#thunderbird-reviewers
Target Milestone: --- → 162 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/e45e51898af6
Fix manual filtering of selected messages in search views. r=mkmelin
https://hg.mozilla.org/comm-central/rev/de7244fe0230
Disable folder-wide filtering in saved searches. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 13 days ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: