Closed Bug 518846 Opened 10 years ago Closed 10 years ago

search in searchbar shold search by subject, from, to, cc, bcc

Categories

(SeaMonkey :: MailNews: General, enhancement)

x86
Windows XP
enhancement
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mozdiav, Assigned: rkent)

Details

(Keywords: fixed-seamonkey2.0)

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.9.3a1pre) Gecko/20090925 SeaMonkey/2.1a1pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.9.3a1pre) Gecko/20090925 SeaMonkey/2.1a1pre

Now search field located in search bar searches only in subject and sender in normal boxes, and via recepient and subject in sent folder. During search by recepient in sent folder bcc field ignored. It's wrong.

I think this "fast search" field should search all main fields - at least subject, from, to, cc, bcc, in all folders. Simple query language support will be better - to search like 'paul johnson -"john" ' means "with strings paul or johnson, bun not exactly word john.


Reproducible: Always
The new "Subject, From, or Recipient" quicksearch term does exactly that.
Build identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.9.3a1pre) Gecko/20090925 SeaMonkey/2.1a1pre

I have a letter with "yan" substring in bcc field. 
Choose "sent" folder, where hat letter located. Move cursor to search bar, typing "yan". The list of mails in folder clears - no one mail.
Then, go to tools -> search messages menu.
Choose "customize" in search field, add "bcc". return into main form, search for "bcc contains yan"
press "search".

Bingo! List shows me my letters bcc'ed to yan!

Why I not give this result with search bar, if searchbar already "quicksearch term does exactly that"?
Where is my misunderstanding?
As I said today in IRC, here is a patch to switch quicksearch to use the new AllAddresses term, which also supports BCC. The SM powers-that-be will have to sort out whether they want this change or not though.
Assignee: nobody → kent
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #402879 - Flags: review?(mnyromyr)
Attachment #402879 - Flags: approval-seamonkey2.0?
Comment on attachment 402879 [details] [diff] [review]
Switch to AllAddresses search attribute

Sounds reasonable to me...
Attachment #402879 - Flags: superreview?(neil)
Attachment #402879 - Flags: review?(mnyromyr)
Attachment #402879 - Flags: review+
Attachment #402879 - Flags: superreview?(neil)
Attachment #402879 - Flags: superreview+
Attachment #402879 - Flags: approval-seamonkey2.0?
Comment on attachment 402879 [details] [diff] [review]
Switch to AllAddresses search attribute

>-  if (isSentFolder)
>-  {
>-    tree.setAttribute("lastfoldersent", "true");
>-    searchBox.emptyText = gMessengerBundle.getString("searchRecipientEmptyText");
>-  }
>-  else
>-  {
>-    tree.setAttribute("lastfoldersent", "false");
>-    searchBox.emptyText = gMessengerBundle.getString("searchFromEmptyText");
>-  }
"lastfolderset" is vitally important! But you can now set the attribute directly, rather than using if/else.

>+  var searchAttrib = nsMsgSearchAttrib.AllAddresses;
This constant is only used once, so you might as well inline it, and fix the comment 5 lines above too ;-)

sr=me with these fixed. Cancelling approval because someone should ideally post a fixed patch for approval.
Attached patch Kept lastfoldersent (obsolete) — Splinter Review
Re-requesting sr, since I did not implement the request to eliminate the nsMsgSearchAttribute constant. That constant is used later in setting the Subject search term.
Attachment #402879 - Attachment is obsolete: true
Attachment #403062 - Flags: superreview?(neil)
Attachment #403062 - Flags: approval-seamonkey2.0?
(In reply to comment #6)
> I did not implement the request to eliminate the nsMsgSearchAttribute
> constant. That constant is used later in setting the Subject search term.
My bad, I meant the "searchAttrib" variable, not constant.

Nit: You probably don't need to use ? "true" : "false" any more since (unlike the old JS version) the new isSpecialFolder function returns a boolean.
Attachment #403062 - Attachment is obsolete: true
Attachment #403064 - Flags: superreview?(neil)
Attachment #403064 - Flags: approval-seamonkey2.0?
Attachment #403062 - Flags: superreview?(neil)
Attachment #403062 - Flags: approval-seamonkey2.0?
So are you saying that it should be:

tree.setAttribute("lastfoldersent", isSentFolder);

?
Comment on attachment 403064 [details] [diff] [review]
Really did what Neil wanted this time.

Not if you don't want to.
Attachment #403064 - Flags: superreview?(neil) → superreview+
Version: unspecified → Trunk
Attachment #403064 - Flags: approval-seamonkey2.0? → approval-seamonkey2.0+
Comment on attachment 403064 [details] [diff] [review]
Really did what Neil wanted this time.

Checked in http://hg.mozilla.org/comm-central/rev/5e8d2ae9de7e
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.