Closed Bug 429889 Opened 16 years ago Closed 16 years ago

continuous creation of saved bookmark search generate wrong search

Categories

(Firefox :: Bookmarks & History, defect)

x86
All
defect
Not set
major

Tracking

()

RESOLVED FIXED
Firefox 3

People

(Reporter: u69748, Assigned: mak)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008041907 Minefield/3.0pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008041907 Minefield/3.0pre

When we continuously create the saved bookmark search, wrong search is generated.

Reproducible: Always

Steps to Reproduce:
1. Open Library
2. Search "Mozilla" in search box. (will hit lots of pages)
3. Click "save" button and generate a saved search folder named "Mozilla".
4. Clicking "Mozilla" save search folder will show lots of pages.
5. Again, search "AAAAA" in search box. (will not hit any page)
6. Click "save" button and generate a saved search folder named "AAAAA"

Actual Results:  
7. Clicking "AAAAA" save search folder will also show lots of pages (same as step 4.).

Expected Results:  
"AAAAA" save search folder will not show any page.

Exported bookmark html file:
<A HREF="place:terms=Mozilla&expandQueries=0&queryType=1">Mozilla</A>
<A HREF="place:terms=Mozilla&OR&terms=AAAAA&expandQueries=0&queryType=1">AAAAA</A>
I can reproduce with recent trunk Linux build.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9pre) Gecko/2008042019 Minefield/3.0pre
OS: Windows XP → All
Version: unspecified → Trunk
Confirmed with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008042008 Minefield/3.0pre
Even if there is a match in the second query, it does not save the correct query.
The query is correct, but not the saved query.
Status: UNCONFIRMED → NEW
Ever confirmed: true
nominating blocking‑firefox3
Flags: blocking-firefox3?
Assignee: nobody → mano
Flags: blocking-firefox3? → blocking-firefox3+
load balancing, think both are possibly related.
Assignee: mano → mak77
Attached patch patch (obsolete) — Splinter Review
So the actual problem has been generated by the removal of the query builder, so most probably is a bug 422977 regression, but also due to the change of the search field to search into current folder.

We are pushing new queries into the .queries property of the now disabled builder, and all these queries are ORed and not removed.

This patch changes the behaviour so that, until the queryBuilder is disabled, we save the current right pane query, so will solve also bug 430055, that instead is due to the fact that we are creating a new query and putting only an hasTerms filter (while now we scope on folder).

So imo bug 430055 is not the same bug as this, but fixing one will fix the other since the same code is involved.

Note: this does not allow searching inside a search, but into such a situation the search field shows "Search Bookmarks" so we are coherent.
Attachment #317274 - Flags: review?(mano)
Whiteboard: [has patch][needs review mano]
Status: NEW → ASSIGNED
Comment on attachment 317274 [details] [diff] [review]
patch

>Index: browser/components/places/content/places.js
>===================================================================
>RCS file: /cvsroot/mozilla/browser/components/places/content/places.js,v
>retrieving revision 1.158
>diff -u -8 -p -r1.158 places.js
>--- browser/components/places/content/places.js	21 Apr 2008 02:32:43 -0000	1.158
>+++ browser/components/places/content/places.js	23 Apr 2008 14:33:09 -0000
>@@ -705,19 +705,17 @@ var PlacesOrganizer = {
>    */
>   saveSearch: function PO_saveSearch() {
>     // Get the place: uri for the query.
>     // If the advanced query builder is showing, use that.
>     var queries = PlacesQueryBuilder.queries;
>     var options = this.getCurrentOptions();
> 
> #ifndef PLACES_QUERY_BUILDER
>-    var query = PlacesUtils.history.getNewQuery();
>-    query.searchTerms = PlacesSearchBox.value;
>-    queries.push(query);
>+    queries = this.getCurrentQueries();
> #endif

would be clearer to ifdef the assignment of |queries|

r=me otherwise
Attachment #317274 - Flags: review?(mano) → review+
Attached patch patchSplinter Review
ifdef/else
Attachment #317274 - Attachment is obsolete: true
Attachment #317274 - Flags: approval1.9?
Whiteboard: [has patch][needs review mano] → [has patch]has reviews]
Whiteboard: [has patch]has reviews] → [has patch][has reviews]
Comment on attachment 317298 [details] [diff] [review]
patch

a1.9=beltzner
Attachment #317298 - Flags: approval1.9+
Whiteboard: [has patch][has reviews] → [has patch][has reviews][has approval]
mozilla/browser/components/places/content/places.js 	1.160 
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [has patch][has reviews][has approval]
Target Milestone: --- → Firefox 3
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".

In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body   contains   places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.

Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.

Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: