Last Comment Bug 518846 - search in searchbar shold search by subject, from, to, cc, bcc
: search in searchbar shold search by subject, from, to, cc, bcc
Status: RESOLVED FIXED
: fixed-seamonkey2.0
Product: SeaMonkey
Classification: Client Software
Component: MailNews: General (show other bugs)
: Trunk
: x86 Windows XP
: -- enhancement (vote)
: ---
Assigned To: Kent James (:rkent)
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-25 09:14 PDT by Igor Velkov
Modified: 2009-09-28 10:10 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Switch to AllAddresses search attribute (5.40 KB, patch)
2009-09-25 11:32 PDT, Kent James (:rkent)
mnyromyr: review+
neil: superreview+
Details | Diff | Splinter Review
Kept lastfoldersent (5.52 KB, patch)
2009-09-26 14:28 PDT, Kent James (:rkent)
no flags Details | Diff | Splinter Review
Really did what Neil wanted this time. (6.44 KB, patch)
2009-09-26 15:05 PDT, Kent James (:rkent)
neil: superreview+
kairo: approval‑seamonkey2.0+
Details | Diff | Splinter Review

Description Igor Velkov 2009-09-25 09:14:34 PDT
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
Comment 1 Kent James (:rkent) 2009-09-25 09:54:46 PDT
The new "Subject, From, or Recipient" quicksearch term does exactly that.
Comment 2 Igor Velkov 2009-09-25 10:03:07 PDT
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?
Comment 3 Kent James (:rkent) 2009-09-25 11:32:50 PDT
Created attachment 402879 [details] [diff] [review]
Switch to AllAddresses search attribute

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.
Comment 4 Karsten Düsterloh 2009-09-25 16:56:04 PDT
Comment on attachment 402879 [details] [diff] [review]
Switch to AllAddresses search attribute

Sounds reasonable to me...
Comment 5 neil@parkwaycc.co.uk 2009-09-26 12:24:20 PDT
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.
Comment 6 Kent James (:rkent) 2009-09-26 14:28:36 PDT
Created attachment 403062 [details] [diff] [review]
Kept lastfoldersent

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.
Comment 7 neil@parkwaycc.co.uk 2009-09-26 14:38:05 PDT
(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.
Comment 8 Kent James (:rkent) 2009-09-26 15:05:17 PDT
Created attachment 403064 [details] [diff] [review]
Really did what Neil wanted this time.
Comment 9 Kent James (:rkent) 2009-09-26 16:52:26 PDT
So are you saying that it should be:

tree.setAttribute("lastfoldersent", isSentFolder);

?
Comment 10 neil@parkwaycc.co.uk 2009-09-26 17:13:23 PDT
Comment on attachment 403064 [details] [diff] [review]
Really did what Neil wanted this time.

Not if you don't want to.
Comment 11 Kent James (:rkent) 2009-09-27 23:47:58 PDT
Comment on attachment 403064 [details] [diff] [review]
Really did what Neil wanted this time.

Checked in http://hg.mozilla.org/comm-central/rev/5e8d2ae9de7e

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