Closed Bug 419779 Opened 16 years ago Closed 15 years ago

ExcludeItems is not ignored for history queries

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: cmtalbert, Assigned: dietrich)

References

Details

Attachments

(2 files, 1 obsolete file)

Attached file Testcase (obsolete) —
As the attached test case demonstrates, the excludeItems query option is not being ignored for history queries. It is claimed in the interface specification that this should be ignored for non-bookmark queries:
http://mxr.mozilla.org/mozilla/source/toolkit/components/places/public/nsINavHistoryService.idl#992

If you comment out the excludeItems line, (line 75), the test will pass as expected.

Tested on current pull of trunk codebase: 02-26-08.
Blocks: 384226
mh, and i hope it continue to be not ignored since we would need it if we go splitting history in the library...
Assignee: nobody → dietrich
Attachment #305931 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #319934 - Flags: review?(mak77)
i still don't get why we should ignore excludeItems for history queries, when history will be splitted in the Library, we will show items in the left pane, and that is a perf killer and a bad behaviour. The screenshot shows what happens with this patch checked-in.

So i would rather update the documentation removing the fact that the options is ignored (excludeItems should generically indicate we only want folders/containers from a query).

Alternatively we could inherit the expandQueries option from the root, as already done for excludeItems, this way excludeItems is ignored but since internal queries inherit expandQueries they should not expand. So it would become:

  PRBool isHistoryQuery =
    mOptions->QueryType() == nsINavHistoryQueryOptions::QUERY_TYPE_HISTORY;

  // if we are child of an ExcludeItems root, we should not expand
  if (mResult && mResult->mRootNode->mOptions->ExcludeItems() &&
      !isHistoryQuery)
    return PR_FALSE;

  if (mResult && !mResult->mRootNode->mOptions->ExpandQueries())
    return PR_FALSE;
Comment on attachment 319934 [details] [diff] [review]
fix + updated testcase

removing review request for now (see comment above)
Attachment #319934 - Flags: review?(mak77)
could we simply fix the idl comment since our history queries have become more complex. or alternatively ignore it only for non-queries containers (so not grouped results)
i'm going to change the comment in bug 422163, since i need it to apply to history queries.
Depends on: 422163
wontfix per bug 422163. i fixed the comment in the idl to reflect this.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
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

Creator:
Created:
Updated:
Size: