-
Notifications
You must be signed in to change notification settings - Fork 2.2k
2.0 migrations #4648
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.0 migrations #4648
Conversation
|
Started on 1.16, created some orders. Migrated to 2.0. If I try to capture an order placed before migration I see this error: |
|
I created an account in previous version, then tried to checkout with that account and got a blank block for shipping until I edited and resaved the address. Only happened the first time. Not sure it's necessarily related to this PR. |
brent-hoover
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of bugs and one question
|
|
||
| // Set `cart.billingAddress` | ||
| if (!cart.billingAddress && Array.isArray(cart.billing) && cart.billing[0]) { | ||
| convertedCart.billingAddress = cart.billing[0].address; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it going to cause a problem if they have more than one billing address and that doesn't get converted? Or are we throwing those addresses away? If so should we use the "default" rather than just the first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we define default? I believe billing address was previously set on either all items in billing array, or just the first, which either way should work for this approach. But I agree it smells bad, so maybe I'll have it use the first item in billing array where address is set.
The worst case here is that someone halfway through checkout out will have to re-enter their billing address, so this part is low risk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be getting cart and addressbook mixed up but the address that has the blue checkmark during checkout. It's true that at worst they would need to re-enter/re-select an address.
|
@zenweasel
|
|
@aldeed I didn't save it but i just created an order with no tax method enabled. Just realized I didn't test marketplace orders. Should I do it again to test it? |
|
That's fine, I figured out the tax rate thing. I don't think we're testing marketplace anymore, although I did write it in a way that should handle marketplace orders. |
|
@zenweasel Pushed fixes for those two issues. |
|
@aldeed Starting to test now |
|
Again not sure if this is related to this PR and will try to test but I see this weird thing (notice that tax was not enabled) |
|
@zenweasel I don't think it's related but I saw that, too, and @jeffcorpuz reproduced it. I believe he made a separate issue for it. |
|
If you close the panel and then click |
Resolves #4630
Impact: minor
Type: feature
Changes
Migrate existing data for cart and orders after an upgrade
Breaking changes
No, quite the opposite hopefully
Testing
masterMigrationscollection in MongoDB, make sure that the control document haslocked === falseand a version at or less than 38.