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

Skip to content

Conversation

@jamesporl
Copy link
Contributor

Resolves #4978
Impact: critical
Type: bugfix

Issue

customFields is not in the order schema causing placing any order to fail.

Solution

Add customFields to order schema.

Breaking changes

None

Testing

  1. Place an order from the starter kit.
  2. The order should be successfully placed.

@rosshadden
Copy link
Contributor

Don't you need to add it to the GraphQL schema as well?

@jamesporl
Copy link
Contributor Author

Im a little confused on what's the intention here. Reading through this PR #4962, I think the intention was to let the plugins extend the Order schema and be specific on the structure of customFields. But the problem is that for plugins that do not require customFields, like Stripe or Example IOU, placing an order is broken because the placeOrder function always saves customFields and by default, the order schema does not have customFields. So there are 2 approaches here: add customFields in Stripe or Example IOU or do as I did in this PR.

@jamesporl
Copy link
Contributor Author

I see here that @kieckhafer will be adding my suggested changes here to this PR: https://github.com/reactioncommerce/reaction/pull/4829/files

So, we can close this.

@jamesporl jamesporl closed this Feb 11, 2019
@kieckhafer
Copy link
Member

@ajporlante It might be better to leave this open and get it merged quickly. The PR of mine you are referring to is a huge PR, and while it’s nearing the end of being reviewed, there might still be some snags before it gets merged.

Considering this is a breaking bug, we should fix it ASAP.

@kieckhafer kieckhafer reopened this Feb 11, 2019
Copy link
Member

@kieckhafer kieckhafer left a comment

Choose a reason for hiding this comment

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

Add customFields in the Jsdoc portion too and this should be good to go.

Signed-off-by: Erik Kieckhafer <[email protected]>
Copy link
Member

@kieckhafer kieckhafer left a comment

Choose a reason for hiding this comment

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

As mentioned, considering checkout is broken in it's current state, this should be merged ASAP instead of waiting for the changes in #4829

@kieckhafer kieckhafer merged commit 89dd3a4 into develop Feb 11, 2019
@kieckhafer kieckhafer deleted the fix-4978-ajporlante-add-customFields-to-order-schema branch February 11, 2019 22:48
@jeffcorpuz jeffcorpuz mentioned this pull request Mar 1, 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.

4 participants