-
Notifications
You must be signed in to change notification settings - Fork 9.4k
magento/magento2#37028: [Sales] Missing relation data when reorder #37298
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
magento/magento2#37028: [Sales] Missing relation data when reorder #37298
Conversation
- fix createOrder method to understand that order is reordered.
Hi @KrasnoshchokBohdan. Thank you for your contribution! Add the comment under your pull request to deploy test or vanilla Magento instance:
❗ Automated tests can be triggered manually with an appropriate comment:
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Functional Tests EE |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Functional Tests CE |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Functional Tests B2B |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Unit Tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Unit Tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Functional Tests B2B |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Functional Tests CE |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Functional Tests CE |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
Failed tests seems flaky to me |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run WebAPI Tests,Unit Tests,Integration Tests,Functional Tests EE,Functional Tests CE,Functional Tests B2B |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run WebAPI Tests,Unit Tests,Functional Tests EE,Functional Tests CE,Functional Tests B2B |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run WebAPI Tests,Unit Tests,Functional Tests EE,Functional Tests CE,Functional Tests B2B |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
Failed test does not seems to related to PR. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run Integration Tests, Unit Tests, WebAPI Tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run Integration Tests, Unit Tests, WebAPI Tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
We updated to v2.4.7-p1 where this fix was pushed and it has caused problems because the "Reorder" button should not cause the new order to link to the previous one as suggested here. We've been using Magento since 2009 and this was never the behaviour of the reorder button. The link on the admin order page to a new order is only when you "Edit" an order. In that case, there should be a link because the orders are the same, you are editing one which cancels the first and makes the second, however, the reorder button is just a shortcut to place a brand new order for a client, it has nothing to do with the previous order. This "fix" should be removed, it makes no sense at all. |
We are encountering the same issue! All reorders are now being incorrectly linked to the original orders. I completely agree that this "fix" should be reverted. It’s frustrating and disrupts the intended functionality of the reorder button, which should create a brand new order without any ties to the previous one. |
Description (*)
Change \Magento\Sales\Model\AdminOrder\Create::createOrder to understand that order is reordered, before changes part of this method didn't work because it tries to get order from session, now it looks to 'reordered' parameter that added in \Magento\Sales\Model\AdminOrder\Create::initFromOrder
Related Pull Requests
--
Fixed Issues (if relevant)
Manual testing scenarios (*)
Before fix:
relation_child_id and relation_child_real_id are not set in parent order row. No link is diplayed on parent order view to new order.
relation_parent_id and relation_parent_real_id are not set in child order row. No link is diplayed on child order view to parent order.
After fix:
relation_child_id and relation_child_real_id are set in parent order row. A link is diplayed on parent order view to new order.
relation_parent_id and relation_parent_real_id are set in child order row. A link is diplayed on child order view to parent order.
Questions or comments
Contribution checklist (*)