Closed Bug 618624 Opened 14 years ago Closed 13 years ago

in message filter "content-type" for News account, I am missing "doesn't contain" choice (News only problem)

Categories

(MailNews Core :: Filters, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Thunderbird 10.0

People

(Reporter: troglo39, Assigned: aceman)

References

Details

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7

in message filter "content-type" I am missing "doesn't contain" choice

Reproducible: Always

Steps to Reproduce:
1.creating a filter rule 
2.under "customize" add "Content-type"
3.under possibe operators I miss "doesn't contain"
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7

works for me
Here too, same build and platform but without Lightning installed. Do you have any extensions that may interfere? Check Tools > Add-ons > Extensions.
noticed now that the problem appears only in newsgroups
Component: General → Filters
Product: Thunderbird → MailNews Core
QA Contact: general → filters
Anything (errors in particular) in Tools -> Error console when you create the filter ?
Played a bit with the filter, run it but didn't get any error in the console.
I can confirm this on Thunderbird 7, linux, on newsgroup account.
Any custom header only gives these options: contains, is, begins with, ends with. The builtin headers all have their own options (operators), depending on their value type (like date, numeric). Textual headers like Subject also additionally allow 'doesn't contain', 'isn't'.
It happens also in safe mode. My suggestion is to allow every possible operator on a custom header (even the numeric ones, like 'greater', 'is before'). It is up to the user to know what values the header may have.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: x86 → All
Version: unspecified → 7
Summary: in message filter "content-type" I am missing "doesn't contain" choice → in message filter "content-type" for News account, I am missing "doesn't contain" choice (News only problem)
Confirming it is on news account only. And the test was on TB8beta, not 7.
Attached patch 1st attempt at a fix (obsolete) — Splinter Review
I think negations of existing string operations should be safe.
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Attachment #568520 - Flags: review?(kent)
Comment on attachment 568520 [details] [diff] [review]
1st attempt at a fix

This patch is somehow not created correctly, so will not apply. The code itself looks OK but I would still like to compile and run it.

The preamble is:

--- nsMsgSearchNews.cpp	2011-10-19 12:38:21.000000000 +0200
+++ nsMsgSearchNews.cpp.new	2011-10-20 23:24:42.000000000 +0200
@@ -474,18 +474,22 @@ nsresult nsMsgSearchValidityManager::Ini


A typical patch of mine, using hg with mq to generate, would look like:

# HG changeset patch
# Parent ef977dca2337aebabfd77af8d02a9d8a394d849b
bug 668952 - Inbox corruption/error message  occurs with "move to folder" filters

diff --git a/mailnews/local/src/nsPop3Sink.cpp b/mailnews/local/src/nsPop3Sink.cpp
--- a/mailnews/local/src/nsPop3Sink.cpp
+++ b/mailnews/local/src/nsPop3Sink.cpp
Attachment #568520 - Flags: review?(kent) → review-
Attached patch 2nd try (obsolete) — Splinter Review
Attachment #568520 - Attachment is obsolete: true
Attachment #568711 - Flags: review?(kent)
Comment on attachment 568711 [details] [diff] [review]
2nd try

Looking at this again, I don't think this will work - but this is Joshua's code so he should comment. This code is not the base search code, but the online server code, so the online search calls need to support this.
Attachment #568711 - Flags: review?(kent) → review?(Pidgeot18)
Comment on attachment 568711 [details] [diff] [review]
2nd try

As rkent fears, this doesn't work with online XPAT searches, but it does work for filters. Rip out the features for search and only keep the one for filters--I'm not going to try to ask you to get online search working because some brief tests indicate that it involves a lot more hackery to go in.
Attachment #568711 - Flags: review?(Pidgeot18) → review-
I do not know what are XPAT searches.

But I'd like to understand why there are different capabilities in the various Init<protocol>[Filter]Table functions...
Attachment #568711 - Attachment is obsolete: true
Attachment #569755 - Flags: review?(Pidgeot18)
Attachment #569755 - Flags: review?(Pidgeot18) → review+
Keywords: checkin-needed
Comment on attachment 569755 [details] [diff] [review]
next try, only touching InitNewsFilterTable [Checkin: comment 14]

http://hg.mozilla.org/comm-central/rev/1662ababd5c0
Attachment #569755 - Attachment description: next try, only touching InitNewsFilterTable → next try, only touching InitNewsFilterTable [Checkin: comment 14]
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 10.0
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.