Skip to content
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

Support sorting product by update date #3470

Merged

Conversation

jxltom
Copy link
Contributor

@jxltom jxltom commented Dec 17, 2018

Current the products can only be sorted by name and price, it will be nice to sort them by update date.

This PR adds this support which will sort products by update_at field of product model.

Pull Request Checklist

  1. Privileged views and APIs are guarded by proper permission checks.
  2. All visible strings are translated with proper context.
  3. All data-formatting is locale-aware (dates, numbers, and so on).
  4. Database queries are optimized and the number of queries is constant.
  5. Database migration files are up to date.
  6. The changes are tested.
  7. The code is documented (docstrings, project documentation).
  8. GraphQL schema and type definitions are up to date.
  9. Changes are mentioned in the changelog.

@jxltom jxltom force-pushed the support-sort-product-by-updated-date branch from 2bdaa2e to 5b0e632 Compare December 17, 2018 09:21
@codecov
Copy link

codecov bot commented Dec 17, 2018

Codecov Report

Merging #3470 into master will decrease coverage by <.01%.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3470      +/-   ##
==========================================
- Coverage   89.75%   89.75%   -0.01%     
==========================================
  Files         237      237              
  Lines       12943    12947       +4     
  Branches     1312     1314       +2     
==========================================
+ Hits        11617    11620       +3     
  Misses        922      922              
- Partials      404      405       +1
Impacted Files Coverage Δ
saleor/graphql/product/types.py 97% <80%> (-0.3%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2111d8f...d738521. Read the comment docs.

@maarcingebala maarcingebala merged commit e3fdb13 into saleor:master Dec 17, 2018
@jxltom jxltom deleted the support-sort-product-by-updated-date branch December 18, 2018 01:03
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.

None yet

3 participants