Skip to content

Allow sorting by createdAt ascending #508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 25, 2016

Conversation

noahsilas
Copy link
Contributor

When attempting to sort by the createdAt column, we would still apply
the default sort ordering of -createdAt, meaning that we would specify
a sort order of createdAt,-createdAt. When Parse-Server gets a sort
order in which the same field appears more than once, it will use the
last entry for the field in its sorting. This means that the sort the
user has selected is overwritten by the default sort we apply.

We now check to see if the sort we are applying is already on the
createdAt field, and if so we do not apply the default ordering.

Fixes #447.

When attempting to sort by the `createdAt` column, we would still apply
the default sort ordering of `-createdAt`, meaning that we would specify
a sort order of `createdAt,-createdAt`. When Parse-Server gets a sort
order in which the same field appears more than once, it will use the
last entry for the field in its sorting. This means that the sort the
user has selected is overwritten by the default sort we apply.

We now check to see if the sort we are applying is already on the
`createdAt` field, and if so we do not apply the default ordering.

Fixes parse-community#447.
@ghost
Copy link

ghost commented Aug 25, 2016

By analyzing the blame information on this pull request, we identified @beingbook, @drew-gross and @TylerBrock to be potential reviewers.

@ghost
Copy link

ghost commented Aug 25, 2016

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks!

@ghost ghost added the CLA Signed label Aug 25, 2016
@ghost
Copy link

ghost commented Aug 25, 2016

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@dvanwinkle
Copy link
Contributor

Looks good to me.

@drew-gross drew-gross merged commit b84f953 into parse-community:master Aug 25, 2016
georgeloh added a commit to georgeloh/parse-dashboard that referenced this pull request Sep 7, 2016
…oard into heroku_master

* 'master' of https://github.com/ParsePlatform/parse-dashboard: (77 commits)
  Updating ISSUE_TEMPLATE to match the latest versions (parse-community#525)
  Added support for node 4.3 and some documentation to Authentication.js (parse-community#513)
  Added add row button to data browser toolbar. (parse-community#512)
  Made the encrypted passwords an option (parse-community#510)
  Allow sorting by `createdAt` ascending (parse-community#508)
  Version 1.0.18 (parse-community#507)
  E2e test (parse-community#505)
  Version 1.0.17 (parse-community#502)
  Revert "using mount path when mounted as express module" (parse-community#501)
  Version 1.0.16 (parse-community#498)
  Added the ability to accept encrypted passwords (parse-community#487)
  using mount path when mounted as express module (parse-community#486)
  fix misspelling (parse-community#497)
  Add AttachSelectedRowsDialog (parse-community#465)
  Version 1.0.15
  Add/relation viewer (parse-community#452)
  Changed Sidebar Footer links to open in a new tab (parse-community#460)
  Updated paths Procfile (parse-community#461)
  Add allowInsecureHTTP option with Express (parse-community#457)
  Note that env vars only work with parse-dashboard (parse-community#458)
  ...
georgeloh added a commit to georgeloh/parse-dashboard that referenced this pull request Sep 7, 2016
* heroku_master: (91 commits)
  added latest configfile
  Updating ISSUE_TEMPLATE to match the latest versions (parse-community#525)
  Added support for node 4.3 and some documentation to Authentication.js (parse-community#513)
  Added add row button to data browser toolbar. (parse-community#512)
  Made the encrypted passwords an option (parse-community#510)
  Allow sorting by `createdAt` ascending (parse-community#508)
  Version 1.0.18 (parse-community#507)
  E2e test (parse-community#505)
  Version 1.0.17 (parse-community#502)
  Revert "using mount path when mounted as express module" (parse-community#501)
  Version 1.0.16 (parse-community#498)
  Added the ability to accept encrypted passwords (parse-community#487)
  using mount path when mounted as express module (parse-community#486)
  fix misspelling (parse-community#497)
  Add AttachSelectedRowsDialog (parse-community#465)
  Version 1.0.15
  Add/relation viewer (parse-community#452)
  Changed Sidebar Footer links to open in a new tab (parse-community#460)
  Updated paths Procfile (parse-community#461)
  Add allowInsecureHTTP option with Express (parse-community#457)
  ...

# Conflicts:
#	Parse-Dashboard/index.js
#	Parse-Dashboard/parse-dashboard-config.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants