filters run on a different folder than selected

RESOLVED FIXED in Thunderbird 45.0

Status

Thunderbird
Filters
--
critical
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: aceman, Assigned: alta88)

Tracking

({dataloss, regression})

Trunk
Thunderbird 45.0
x86
Windows XP
dataloss, regression

Thunderbird Tracking Flags

(thunderbird42 wontfix, thunderbird43 fixed, thunderbird44 fixed, thunderbird45 fixed, thunderbird_esr3844+ fixed)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

3 years ago
STR:
1.Select a folder other than Inbox
2.Use Tools->Filters
3.Observe the currently selected folder is shown in the "run selected filters on:"
4.Select a filter (I used "match all messages, add star")
5.Click "Run Now"

Expected result:
Messages in the currently visible folder filtered (in my case all starred).

Actual result:
Nothing happens. (If you use "Add star action" on Windows XP, be sure not to actually see bug 1198314).
But after further inspection, I noticed the filter got applied to another folder, in my case Inbox of the first account.

I marked this dataloss as depending on what the filter does, it may delete messages in another folder without the user noticing. Even if the messages get into Trash, the user may later empty it as he doesn't know valid messages are hiding there.

Potential regression from bug 878805, which touched the folder picker.

Comment 1

3 years ago
So this would only ever happen with Run Now?
Blocks: 878805
Severity: major → critical
Flags: needinfo?(acelists)
Keywords: regression
(Reporter)

Comment 2

3 years ago
Yes, I think so. It is a bug in the filter list dialog. There should be no problem when filters are run automatically (on receive or send), or if run from the menu (run filters on folder).

Can anybody reproduce it?
Flags: needinfo?(acelists)
(Reporter)

Comment 3

3 years ago
Alta88, can you please look at this?
Flags: needinfo?(alta88)
(Assignee)

Comment 4

3 years ago
Created attachment 8690409 [details] [diff] [review]
initRunFolder.patch
Assignee: nobody → alta88
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(alta88)
Attachment #8690409 - Flags: review?(mkmelin+mozilla)
(Assignee)

Comment 5

3 years ago
Created attachment 8690416 [details] [diff] [review]
initRunFolder.patch

disable Run button if no folder selected.
Attachment #8690409 - Attachment is obsolete: true
Attachment #8690409 - Flags: review?(mkmelin+mozilla)
Attachment #8690416 - Flags: review?(mkmelin+mozilla)

Comment 6

3 years ago
Comment on attachment 8690416 [details] [diff] [review]
initRunFolder.patch

Review of attachment 8690416 [details] [diff] [review]:
-----------------------------------------------------------------

Looks reasonable. r=mkmelin with the comment clarified.

::: mail/base/content/FilterListDialog.js
@@ +241,5 @@
>  
>     if (canFilterAfterTheFact) {
> +     // Get the first folder for this server. INBOX for IMAP and POP3 accounts
> +     // and 1st news group for news. Disable the button for Choose Folder, for
> +     // none of the above accounts.

don't know what this last line is supposed to mean.
Attachment #8690416 - Flags: review?(mkmelin+mozilla) → review+
(Reporter)

Comment 7

3 years ago
Comment on attachment 8690416 [details] [diff] [review]
initRunFolder.patch

Review of attachment 8690416 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks, seems to work for me too. Somehow I saw the bug now (before the patch) only on a subfolder of Inbox.
Attachment #8690416 - Flags: feedback+
(Assignee)

Comment 8

2 years ago
Created attachment 8691370 [details] [diff] [review]
initRunFolder.patch

clarify comment.
Attachment #8690416 - Attachment is obsolete: true
Attachment #8691370 - Flags: review+
(Assignee)

Updated

2 years ago
Keywords: checkin-needed

Comment 9

2 years ago
https://hg.mozilla.org/comm-central/rev/d45abb4b289717f94a91e82800326ea294b4811a
Bug 1198744 - Filters run on a different folder than selected. r=mkmelin

Comment 10

2 years ago
Looks to me like this affects esr38 and everything newer? Please mark for uplift if so.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
tracking-thunderbird43: --- → ?
tracking-thunderbird44: --- → ?
tracking-thunderbird_esr38: --- → ?
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 45.0
(Assignee)

Comment 11

2 years ago
Comment on attachment 8691370 [details] [diff] [review]
initRunFolder.patch

Low risk uplift, to ensure folderpane selected folder is set in Filterlist dialog on open.
Attachment #8691370 - Flags: approval-comm-esr38?

Comment 12

2 years ago
Comment on attachment 8691370 [details] [diff] [review]
initRunFolder.patch

I've been asked to mend my profligate ways and only push really urgent things to comm-esr38. But on the small chance that I relapse and want to merge it, it needs to go through a beta cycle first. Let's try to get it in.

http://hg.mozilla.org/releases/comm-aurora/rev/3f9bc9fae33f
http://hg.mozilla.org/releases/comm-beta/rev/db4f54bf946b
Attachment #8691370 - Flags: approval-comm-beta+
Attachment #8691370 - Flags: approval-comm-aurora+

Updated

2 years ago
status-thunderbird42: --- → wontfix
status-thunderbird43: --- → fixed
status-thunderbird44: --- → fixed
status-thunderbird45: --- → fixed
status-thunderbird_esr38: --- → affected
tracking-thunderbird43: ? → ---
tracking-thunderbird44: ? → ---

Comment 13

2 years ago
Because of the missing beta 43, this patch did not get tested in a beta. I am reluctant to uplift to esr38 without at least a beta cycle. Any objections to waiting and considering again for 38.6?

Comment 14

2 years ago
Comment on attachment 8691370 [details] [diff] [review]
initRunFolder.patch

https://hg.mozilla.org/releases/comm-esr38/rev/e839c236d499

I looked this over, and it seems low risk to me, and the effects of running a filter on the wrong folder can be pretty bad.
Attachment #8691370 - Flags: approval-comm-esr38? → approval-comm-esr38+

Updated

2 years ago
status-thunderbird_esr38: affected → fixed
tracking-thunderbird_esr38: ? → 44+
You need to log in before you can comment on or make changes to this bug.