Open HenKun opened 3 years ago
Hi @HenKun. Thank you for your report. To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
Please, add a comment to assign the issue: @magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.
:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
Hi @engcom-Alfa. 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:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @HenKun . Thank you for your report!
Unfortunately, we are not able to reproduce the issue on а clean 2.4-develop. Everything works as expected.
Precondition: Configure DHL shipping method;
Manual testing scenario:
Actual Result: Shipping Label was successfully created
@HenKun Maybe we missed something? Could you take a look? Thanks!
@engcom-Alfa
The steps seem correct, however I am wondering why your shipment could be created successfully if the product is not in stock (after setting stock to 0 manually).
Normal behavior:
The case on hand:
So maybe these config settings were not correct:
cataloginventory/options/can_subtract
needs to be true
cataloginventory/item_options/manage_stock
nees to be true
cataloginventory/item_options/backorders
needs to be false
So the issue on hand will occur, if the shipment fails, i.e. shipment cannot be created if the qty of the product is already 0.
You can even simulate the problem by throwing an arbitrary exception in Magento\Shipping\Controller\Adminhtml\Order\Shipment\Save::_saveShipment
. And indeed, the shipment can fail on whatever failure happens in _saveShipment
.
Any more updates needed for this issue?
Hi @engcom-November. 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:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Verified the issue on Magento 2.4-develop branch and the issue is reproducible: Steps to reproduce:
:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-938 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
Verified the scenario again by putting back the same Product quantity to Stock and created Shipment again for the same order with Shipping Label - Shipment is created with new Shipping Label and DB tables are updated as expected - No issue. Issue observed only when product Quantity is 0 while creating Shipment with Shipping Label - Shipment is failing but Shipping Label is getting created. Steps to reproduce:
Amy progress on that?
Any news on that?
Preconditions (*)
Magento 2.4.1 Netresearch DHL Shipping Module (dhl/shipping-m2) v1.3.0 (but it will happen with any other carrier that is able to print shipping labels)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
Message is shown: "Not all of your products are available in the requested quantity."
Shipping Label is created in background without any immediate notice and without any comment on the order that a label was created although shipment failed.
Reason
The creation of the label takes place in
Magento\Shipping\Controller\Adminhtml\Order\Shipment\Save::execute
on line 153. The check for out of stock items takes place inMagento\Shipping\Controller\Adminhtml\Order\Shipment\Save::execute
on line 157 (i.e. somewhere in_saveShipment
), so after the labels was already created successfully. By saying that, all errors that might occur inMagento\Shipping\Controller\Adminhtml\Order\Shipment\Save::_saveShipment
result in a failed shipment but in a successfully created shipping label in the background.Proposed solutions
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.