Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aldeed
Copy link
Contributor

@aldeed aldeed commented Nov 26, 2018

Resolves #4766
Impact: minor
Type: feature

Related storefront PR: reactioncommerce/example-storefront#434

Issue

Orders did not have a non-transformed reference ID on them, by which they could be referenced and matched up by both operators and customers. This was being worked around in storefront code by decoding the Order._id from GraphQL, but this is not a reliable way to do it, and it doesn't allow for customization of order reference ID generation.

Solution

  • Add Order.referenceId both in the database and in GraphQL schema
  • Migrate existing orders to set the internal Order._id to the Order.referenceId
  • Update all operator and classic storefront UI that shows "Order ID" to show the Order.referenceId instead of the Order._id.

Breaking changes

None

Testing

  1. Place an order using the classic UI
  2. Verify that the order ID on the order completion page matches the order ID that shows everywhere in the operator Orders panel, on PDF invoice, and in all emails that are sent.
  3. Place an order using the NextJS storefront UI (branch from corresponding PR Use new order.referenceId as displayed order ID example-storefront#434)
  4. Verify that the order ID on the order completion page matches the order ID that shows everywhere in the operator Orders panel, on PDF invoice, and in all emails that are sent.
  5. Query the orders by GraphQL and verify that you can get the order.referenceId field.

@aldeed
Copy link
Contributor Author

aldeed commented Nov 26, 2018

The CI check failure is a feature branch deploy issue not related to this PR

@mikemurray
Copy link
Member

@aldeed Can you resolve the conflict.

Copy link
Member

@mikemurray mikemurray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything appears to be working, but there's a conflict that needs to be resolved.

@mikemurray mikemurray dismissed their stale review November 26, 2018 21:42

Fixed conflict

@mikemurray
Copy link
Member

All tests passed except for deploy-to-ecs-feature-branch which has been pointed out by @aldeed to not be an issue related to this PR.

Merging

@mikemurray mikemurray merged commit c575fa3 into release-2.0.0-rc.7 Nov 26, 2018
@mikemurray mikemurray deleted the feat-4766-aldeed-order-ref-id branch November 26, 2018 22:08
@spencern spencern mentioned this pull request Jan 8, 2019
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