Closed Bug 869197 Opened 11 years ago Closed 11 years ago

Ensure sorting make results work

Categories

(Webmaker Graveyard :: MakeAPI, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: daleee, Assigned: cade)

References

Details

(Whiteboard: u=dev p=1 s=2013w19)

Attachments

(1 file)

Sample code: http://pastebin.mozilla.org/2380312
As of now, returning the same data whether .field is 'asc' or 'desc'.
Assignee: nobody → chris
Blocks: 869087
Whiteboard: u=dev p=1 s=2013w19
I'll check this out Tuesday morning
Depends on: 866832
I've changed the "field" function to "sortByField" to make it clearer what it does. I've also added a way to test asc/desc sorting on the search page.

Also, there was a bug in created at where it would always be the same date.
Attachment #746440 - Flags: review?(schranz.m)
Attachment #746440 - Flags: review?(me)
I've experienced a similar bug when I worked with Mongo & Express in the past (the date always being some 1974 date). Thanks for doing this! Changes look good to me; 'sortByField' makes a lot more sense.
Put that dep on the wrong bug.
No longer depends on: 866832
Comment on attachment 746440 [details] [review]
https://github.com/mozilla/MakeAPI/pull/49

R+ from me.

I guess just make sure people using the API know this changed. I changed it from sortByField originally to just field because I didn't like people being forced to key on "sortByField" when using make.find and passing it the object of filters.
Attachment #746440 - Flags: review?(schranz.m) → review+
Attachment #746440 - Flags: review?(me)
Commit pushed to master at https://github.com/mozilla/MakeAPI

https://github.com/mozilla/MakeAPI/commit/a5a5219fbf64e61f235b06cadcd0df3f2f363852
Bug 869197 - Change field to sortByField, add asc/desc selector to search page
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: