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

[2.3-develop] Order grid - Sort by Purchase Date Desc by default #11931

Conversation

ihor-sviziev
Copy link
Contributor

(cherry picked from commit ad3c18f) #11911

Description

As a customer I expect to see new orders at the top of the grid, however during migration from M1 to M2 - order number length changed, as result new orders are NOT located at the top of grid.

In order to fix this issue for all cases - we're changing default sorting order to "Purchase Date" desc.

As we discussed with @okorshenko in #10185 (comment) sorting order grid by Increment is not good idea. I'm proposing change default sorting from increment_id column to created_at.

Sorting issue happens only in following cases:

  • Orders were migrated from Magento 1
  • Used prefix/suffix for order number
  • Customized order ID generation
  • Etc.

NOTE: Order grid sorting saves in ui_bookmark table, so before testing need to execute following SQL:

TRUNCATE table ui_bookmark;

Fixed Issues (if relevant)

Manual testing scenarios

  1. Create three orders as example 1000000001, 1000000002 and 1000000003
  2. Go to order grid (sorting is correct)
    capture 2017-10-02 at 17 58 47
  3. Change 1000000001 order number to 100000001 (remove one 0 in the center) to emulate that order was migrated from M1 & Go to Order grid: (last created order became NOT first)
    capture 2017-10-02 at 18 01 04
  4. Create new Order & go to order grid (latest order is not at the top)
    capture 2017-10-02 at 18 04 09

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@okorshenko okorshenko self-assigned this Nov 1, 2017
@okorshenko okorshenko added this to the November 2017 milestone Nov 1, 2017
@magento-team magento-team merged commit a29eda0 into magento:2.3-develop Nov 2, 2017
magento-team pushed a commit that referenced this pull request Nov 2, 2017
[EngCom] Public Pull Requests - develop
 - MAGETWO-83154: [2.3-develop] Order grid - Sort by Purchase Date Desc by default #11931
 - MAGETWO-83101: [Backport 2.3-develop] #8236 FIX CMS blocks #11805
 - MAGETWO-83092: Remove unneeded, also mistyped, saveHandler from CatalogSearch indexer declaration #11626
 - MAGETWO-83091: Remove "Undefined fields" from under lib folder #11662
 - MAGETWO-83083: 10195: Order relation child is not set during edit operation #11909
 - MAGETWO-82998: [2.3-develop] X-Magento-Tags header containing whitespaces causes exception #11849
 - MAGETWO-82633: #11409: Too many password reset requests even when disabled in settings #11434
@ihor-sviziev ihor-sviziev deleted the 2.3-develop-order-grid-sort-by-purchase-date branch February 2, 2018 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants