Ensure sorting make results work

RESOLVED FIXED

Status

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: daleee, Assigned: cade)

Tracking

Details

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

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Sample code: http://pastebin.mozilla.org/2380312
As of now, returning the same data whether .field is 'asc' or 'desc'.
(Reporter)

Updated

5 years ago
Assignee: nobody → chris
(Reporter)

Updated

5 years ago
Blocks: 869087

Updated

5 years ago
Whiteboard: u=dev p=1 s=2013w19
(Assignee)

Comment 1

5 years ago
I'll check this out Tuesday morning
(Assignee)

Updated

5 years ago
Depends on: 866832
(Assignee)

Comment 2

5 years ago
Created attachment 746440 [details] [review]
https://github.com/mozilla/MakeAPI/pull/49

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)
(Reporter)

Comment 3

5 years ago
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.
(Assignee)

Comment 4

5 years ago
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+
(Assignee)

Updated

5 years ago
Attachment #746440 - Flags: review?(me)

Comment 6

5 years ago
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
(Assignee)

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 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.