Last Comment Bug 541408 - newsgroup filter from "create filter from message" is not created
: newsgroup filter from "create filter from message" is not created
Status: RESOLVED FIXED
:
Product: MailNews Core
Classification: Components
Component: Filters (show other bugs)
: Trunk
: x86 Windows XP
: -- normal (vote)
: Thunderbird 3.1b2
Assigned To: Kent James (:rkent)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-22 08:37 PST by Kent James (:rkent)
Modified: 2010-05-01 12:15 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
.5-fixed


Attachments
restore nntp case in FilterListDialog.js (3.08 KB, patch)
2010-03-30 15:00 PDT, Kent James (:rkent)
no flags Details | Diff | Review
without changing the root server (3.01 KB, patch)
2010-03-30 16:40 PDT, Kent James (:rkent)
jminta: review+
standard8: approval‑thunderbird3.0.5+
Details | Diff | Review

Description Kent James (:rkent) 2010-01-22 08:37:28 PST
From m.s.Thunderbird:
===
I have been running Thunderbird 2.0.23 and
I just installed Thunderbird 3.0.1 and I find
that message filters are not working.
Here are the steps which were taken.

while viewing any message from mozilla.support.thunderbird
Select Message > Create Filter From Message...
the "Filter Rules" window appears
Enter a (unique) name in the top window
select "Match any..."
Select From
Select Contains
leave 3rd window as is or enter as desired
Under "Perform these actions:"
from the drop down menu Select "Delete Message"
Click OK
"Filter Rules" windows dissolves and
"Message Filters" window appears
        (the new "unique" filter is not evident)
Click X to close Message Filters window
Click Tools > Message Filters...
and observe that the filter is not there.

Under Tb 2.0.23, the new created filter would appear
in the Tools > Message Filters... window
Thank you,
Charles
===

I (rkent) was able to reproduce this.
Comment 1 Kent James (:rkent) 2010-02-27 15:04:31 PST
The filter I believe is being created, but in the newsgroup not the server.
Comment 2 Kent James (:rkent) 2010-03-30 14:58:53 PDT
*** Bug 540890 has been marked as a duplicate of this bug. ***
Comment 3 Kent James (:rkent) 2010-03-30 15:00:46 PDT
Created attachment 436024 [details] [diff] [review]
restore nntp case in FilterListDialog.js
Comment 4 Kent James (:rkent) 2010-03-30 15:55:13 PDT
Comment on attachment 436024 [details] [diff] [review]
restore nntp case in FilterListDialog.js

I was writing a long explanation of why I did was changing the root folder here, and the realized that that change is not necessary because the fixes in bug 537012 are upstream of this, and therefore I do not need them here. So I will redo this patch with just the change to nntp.
Comment 5 Kent James (:rkent) 2010-03-30 16:40:09 PDT
Created attachment 436066 [details] [diff] [review]
without changing the root server
Comment 6 Kent James (:rkent) 2010-03-30 16:46:49 PDT
In bug 435804 (part of the de-RDF effort) the function getSelectedServerForFilters() was changed to return a server rather than a folder - and in the process just blew away the check that special-cases nntp to have filters be folder-specific. I reverted that decision so that it returns a folder again (and renamed it to reduce confusion), then restored that to its previous behavior with this line:

return (server.type == "nntp") ? msgFolder : rootFolder;

The rest of this patch is just renaming for clarity, plus some cleanup.

There is no existing test code for the filter list editor (though it would have been great if some was available prior to bug 435804, as I have already fixed many regressions from that and still have more to do). I don't think it is practical to implement it for this small bug.
Comment 7 Dan Mosedale (:dmose) 2010-03-31 18:07:52 PDT
Comment on attachment 436066 [details] [diff] [review]
without changing the root server

jminta is clearly the best reviewer for this change, since it's reverting what he did.  Happily, I was able to catch up with him, and he's graciously agreed to do it, so handing off.  Thanks, Joey!
Comment 8 Joey Minta 2010-03-31 18:20:25 PDT
Comment on attachment 436066 [details] [diff] [review]
without changing the root server

I think I've made my position clear on functions with only one caller, but that's a battle for another day.  Thanks for the catch, r=jminta
Comment 9 Kent James (:rkent) 2010-04-01 16:03:02 PDT
Comment on attachment 436066 [details] [diff] [review]
without changing the root server

Checked-in http://hg.mozilla.org/comm-central/rev/b7dedc7a90ae
Comment 10 Kent James (:rkent) 2010-04-29 13:07:34 PDT
Comment on attachment 436066 [details] [diff] [review]
without changing the root server

http://hg.mozilla.org/releases/comm-1.9.1/rev/26c5f18d5713

Note You need to log in before you can comment on or make changes to this bug.