Closed Bug 438786 Opened 16 years ago Closed 16 years ago

single folder saved search folders no longer work


(MailNews Core :: Search, defect)

Not set


(Not tracked)



(Reporter: maximilian.mehnert, Assigned: Bienvenu)



(Keywords: regression)


(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9pre) Gecko/2008061104 Minefield/3.0pre
Build Identifier: 3.0a2pre (2008061103)

suddenly, all my search folders no longer work.
I can edit their options (what they should match and where they should search), but opening them results in thunderbird querying the imap server for a folder named the same as my search folder.

The same happens with newly crated search folders.

Reproducible: Always
This is a regression from Bug 436718. It seems to only affect single-folder searches, so if you add another folder to your searches they should start to work. 
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Version: unspecified → Trunk
Moving to better component...
Component: Mail Window Front End → MailNews: Search
Product: Thunderbird → Core
QA Contact: front-end → search
yeah, that's exactly what I suspected :-( I'll see if I fix it...
Assignee: nobody → bienvenu
Flags: wanted-thunderbird3+
Summary: search folders no longer work → single folder saved search folders no longer work
we're now passing in the saved search virtual folder uri to nsMsgQuickSearchDBView::Open, and I think we should be passing in the underlying real folder, which the view will then search over. Venkman time...
ok, I have a fix for this, but I'm going to look at tweaking the code so that it's clearer what's going on
Blocks: 436718
Attached patch proposed fixSplinter Review
this takes a stab at documenting what's going on so that this will be less likely to break in the future.

It also fixes a bug where for a single folder saved search, we were showing the name of the underlying folder in the title bar, not the name of the saved search.
Attachment #324820 - Flags: review?(philringnalda)
Comment on attachment 324820 [details] [diff] [review]
proposed fix

Works fine, and thanks to the documentation, now I even understand what's going on. This is clearly a situation that calls for insane nit-picking!

>+ * @param   folder                - if viewFolder is a single folder saved 
>+                                  - search, this folder is the scope of the 
>+                                  - saved search, the real, underlying folder. 

Trailing whitespace on all three lines, first should start with a capital If.

>+        // realFolder will get set to the underlying folder the 

Trailing whitespace.

>+                      //make msgFolder point to the real folder, not the virtual folder, so that
>+                      //we pass the real folder into ChangeFolder.

Spaces after //s, start with a capital.

Thanks for the explanation, r=philringnalda
Attachment #324820 - Flags: review?(philringnalda) → review+
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9
This now works again for me...

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0
Product: Core → MailNews Core
Blocks: 657607
No longer blocks: 657607
You need to log in before you can comment on or make changes to this bug.