Closed
Bug 385829
Opened 19 years ago
Closed 18 years ago
Search for bookmark queries by lastModified / dateDated
Categories
(Firefox :: Bookmarks & History, defect)
Firefox
Bookmarks & History
Tracking
()
RESOLVED
FIXED
Firefox 3 alpha7
People
(Reporter: asaf, Assigned: moco)
Details
Attachments
(2 files, 5 obsolete files)
|
3.55 KB,
patch
|
moco
:
review+
|
Details | Diff | Splinter Review |
|
10.60 KB,
patch
|
asaf
:
review+
|
Details | Diff | Splinter Review |
For the recently used tags query, we need support for something like
place:folder=[TAG_ROOT]&sort=[LAST_MODIFIED]&maxResults=10
| Assignee | ||
Updated•19 years ago
|
Assignee: nobody → sspitzer
Flags: blocking-firefox3?
Target Milestone: --- → Firefox 3 beta1
| Assignee | ||
Comment 1•18 years ago
|
||
accepting. will start on this ASAP so that I can unblock Mano's other bugs.
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•18 years ago
|
||
still need:
example urls:
// toolbar folder (for me) last modified descending
place:folder=6&queryType=1&sort=14&maxResults=5
// toolbar folder (for me) last modified ascending
place:folder=6&queryType=1&sort=13&maxResults=5
1) unit tests
2) check that when changes are made to the modification date, changes are observed
| Assignee | ||
Comment 3•18 years ago
|
||
determine the proper update requirements for this type of query.
in the past, we have assumed that if you define the max results, it must be a history query, but that is no longer the case.
Attachment #272352 -
Attachment is obsolete: true
| Assignee | ||
Comment 4•18 years ago
|
||
add support for sorting by date added as well
Attachment #272353 -
Attachment is obsolete: true
| Assignee | ||
Comment 5•18 years ago
|
||
with that you can do an interesting query like:
place:queryType=1&sort=12&maxResults=8&onlyBookmarked=1
"show me the top 8 bookmarks sorted by date added descending"
I'll go write some unit tests and then seek review.
| Assignee | ||
Comment 6•18 years ago
|
||
Attachment #272364 -
Flags: review?(mano)
| Assignee | ||
Updated•18 years ago
|
Attachment #272354 -
Flags: review?(mano)
| Reporter | ||
Comment 7•18 years ago
|
||
Seth: wrong bug or wrong patch?
| Assignee | ||
Comment 8•18 years ago
|
||
> Seth: wrong bug or wrong patch?
Actually, an incomplete patch. I misunderstood the problem.
tags are folders (under the tag root, for example, folder=3), and a tagged uri is a bookmark under that folder.
I'll continue working on what you want, which is support for a query that results in the child folders of a folder, sorted by last modified.
I still think we want these changes, though. Can you review them?
| Reporter | ||
Comment 9•18 years ago
|
||
Comment on attachment 272354 [details] [diff] [review]
patch, v3
>Index: toolkit/components/places/src/nsNavHistory.cpp
>===================================================================
>+ NS_WARNING("SORT_BY_DATEADDED_DESCENDING only makes sense for bookmark queries");
>+ return NS_ERROR_UNEXPECTED;
>+ }
>+ break;
I think we better ignore the it here and not throw, the post-query sorting methods have their fallbacks for cases like this.
r=mano otherwise.
Attachment #272354 -
Flags: review?(mano) → review+
| Reporter | ||
Comment 10•18 years ago
|
||
Comment on attachment 272364 [details] [diff] [review]
unit tests
Seth, any chance you can move this test to a separate file (test_bugXXX etc.)? This one is getting overloaded.
| Assignee | ||
Comment 11•18 years ago
|
||
> I think we better ignore the it here and not throw, the post-query sorting
> methods have their fallbacks for cases like this.
I don't think the post-query sorting methods will handle it. What are you thinking of? I think we'll just proceed silently, and not sort at all.
| Reporter | ||
Comment 12•18 years ago
|
||
| Assignee | ||
Comment 13•18 years ago
|
||
Attachment #272364 -
Attachment is obsolete: true
Attachment #272575 -
Flags: review?(mano)
Attachment #272364 -
Flags: review?(mano)
| Assignee | ||
Comment 14•18 years ago
|
||
morphing. logged bug #388378 about what Mano needs for tagging.
| Assignee | ||
Comment 15•18 years ago
|
||
Attachment #272354 -
Attachment is obsolete: true
Attachment #272576 -
Flags: review+
| Assignee | ||
Comment 16•18 years ago
|
||
fixed.
Checking in nsNavHistory.cpp;
/cvsroot/mozilla/toolkit/components/places/src/nsNavHistory.cpp,v <-- nsNavHis
tory.cpp
new revision: 1.143; previous revision: 1.142
done
awaiting review from mano before I check in the unit, so marking in-testsuite?
Flags: in-testsuite?
| Reporter | ||
Comment 17•18 years ago
|
||
Comment on attachment 272575 [details] [diff] [review]
break out unit test, per mano
>Index: test_385829.js
>===================================================================
>+// get bookmarks root index
>+var root = bmsvc.bookmarksRoot;
id, not index.
>+// main
>+function run_test() {
>+ // test search on folder with various sorts and max results
>+ // see bug #385829
>+ try {
please remove the surrounding try block.
>+ var bug385829folder
>+ = bmsvc.createFolder(root, "bug 385829 test", bmsvc.DEFAULT_INDEX);
you can use a shorter name now.
>+ var options = histsvc.getNewQueryOptions();
>+ var query = histsvc.getNewQuery();
>+ options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
>+ options.maxResults = 3;
>+ query.onlyBookmarked = true;
onlyBookmarked is meaningless for QUERY_TYPE_BOOKMARKS
>+ // test SORT_BY_DATEADDED_ASCENDING
>+ options.sortingMode = options.SORT_BY_DATEADDED_ASCENDING;
>+ var result = histsvc.executeQuery(query, options);
>+ var rootNode = result.root;
>+ rootNode.containerOpen = true;
>+ var cc = rootNode.childCount;
>+ do_check_true(cc == 3);
nit: do_check_eq(cc, 3)
>+ rootNode.containerOpen = false;
>+ // test SORT_BY_...
>+ options.sortingMode = options.SORT_BY_...;
>+ result = histsvc.executeQuery(query, options);
>+ rootNode = result.root;
>+ rootNode.containerOpen = true;
hrm, i would rather set the new sortingMode on the result directly so we also test live update.
Attachment #272575 -
Flags: review?(mano) → review-
| Assignee | ||
Comment 18•18 years ago
|
||
Attachment #272575 -
Attachment is obsolete: true
Attachment #273027 -
Flags: review?(mano)
| Assignee | ||
Comment 19•18 years ago
|
||
the fix landed on 7/16, so marking fixed. but the unit test is still pending review.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 20•18 years ago
|
||
Comment on attachment 273027 [details] [diff] [review]
unit tests v2, per mano
r=mano
Attachment #273027 -
Flags: review?(mano) → review+
| Assignee | ||
Comment 21•18 years ago
|
||
unit tests checked in:
cvs commit: Examining .
RCS file: /cvsroot/mozilla/toolkit/components/places/tests/bookmarks/test_385829
.js,v
done
Checking in test_385829.js;
/cvsroot/mozilla/toolkit/components/places/tests/bookmarks/test_385829.js,v <--
test_385829.js
initial revision: 1.1
done
Checking in test_bookmarks.js;
/cvsroot/mozilla/toolkit/components/places/tests/bookmarks/test_bookmarks.js,v
<-- test_bookmarks.js
new revision: 1.33; previous revision: 1.32
done
Flags: in-testsuite? → in-testsuite+
Updated•18 years ago
|
Flags: blocking-firefox3? → blocking-firefox3+
Comment 22•16 years ago
|
||
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.
Description
•