magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.47k stars 9.28k forks source link

Bundle Product - Ship Separately - Order Status Complete #37789

Open timpea-splat opened 1 year ago

timpea-splat commented 1 year ago

Preconditions and environment

Steps to reproduce

  1. Create Bundle Product

  2. Add more than 1 bundled product

  3. Set: Ship Bundle Items - Separately Screenshot 2023-07-24 at 10 21 26

  4. Create order for bundle product, selecting more than 1 product

  5. Invoice order

  6. Ship part of the bundled order Screenshot 2023-07-24 at 10 23 21

Expected result

Order Status: Processing

Actual result

Order Status: Complete

Additional information

No response

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 year ago

Hi @timpea-splat. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 1 year ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Bravo commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Bravo, here is your Magento Instance: https://ea446b48c9a2de103056de856381954d.instances-prod.magento-community.engineering Admin access: https://ea446b48c9a2de103056de856381954d.instances-prod.magento-community.engineering/admin_ba3c Login: 23a0da70 Password: fae82e1e9a60

engcom-Bravo commented 1 year ago

Hi @timpea-splat,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance and the issue is reproducible.Kindly refer the screenshots.

Steps to reproduce

Screenshot 2023-07-25 at 12 40 30 PM Screenshot 2023-07-25 at 12 40 39 PM

After doing partial shipment of the order the order should be in Processing status but it is in Complete status.

Hence Confirming the issue.

Additionally Tested:

It is working fine for other types of products and orders for partial shipments.

Screenshot 2023-07-25 at 12 40 10 PM Screenshot 2023-07-25 at 12 40 18 PM

Thanks.

github-jira-sync-bot commented 1 year ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-9198 is successfully created for this GitHub issue.

m2-assistant[bot] commented 1 year ago

:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

Vikaashkarthick-K commented 1 year ago

@magento I am working on this

jsamhall commented 1 year ago

Hi @Vikaashkarthick-K have you identified the cause for this? We are seeking to patch as this issue is preventing us from deploying our latest application built on 2.4.6 -- Thank you!

jsamhall commented 1 year ago

We believe this bug was introduced by the following commit:

https://github.com/magento/magento2/commit/7d680387d1341319dbf10f3f914f363f2dea81d8#diff-c8d66fa5975f0f5940ac131e828f9b7bd742603d7fcbe236b036a305525e4008

Specifically, in the implementation of isPartiallyRefundedOrderShipped

The logical fault is comparing the value of total_qty_ordered against values derived from iterating over getAllItems() wherein the former will only be inclusive of parent items (or simple products) and the latter will be inclusive of child products.

We use "Ship Bundle Items Separately" so I am more familiar with this logical flow, so the above may not be accurate for your use case.

Our temporary workaround has been to introduced an Around plugin which effectively reverts the changes to vendor/magento/module-sales/Model/ResourceModel/Order/Handler/State.php back to its functionality in 2.4.5 which works for us. The bug that the commit seeks to address is much less severe to us than an inability to partially ship Bundle orders, as this is an extremely common use case for our business.

shahbaztariq commented 6 months ago

@Vikaashkarthick-K @jsamhall this is fixed in quality patch ACSD-57003

https://github.com/magento/quality-patches/blob/master/patches/os/ACSD-57003_2.4.6-p3.patch