Closed lbajsarowicz closed 1 week ago
Hi @lbajsarowicz. 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.
@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, join the Community Contributions Triage session to discuss the appropriate ticket.
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:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. Hi @engcom-Delta. 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:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. Hi @lbajsarowicz,
Thanks for your reporting and collaboration. We have verified the issue in Latest 2.4-develop instance & 2.4.8-beta1 instance, but we are unable to reproduce the issue. Kindly refer the screenshots.
Steps to reproduce
Can you please re-verify and confirm if you are still facing the issue. Thanks.
@magento give me 2.4-develop instance
The problem no longer occurs in the latest (2.4.7) version of Magento. I'll find out what exact Commit fixed the issue and let you know in the thread.
Preconditions and environment
CSV file:
Steps to reproduce
Provided
Default
andOnline Inventory
Online Inventory
Steps
System
>Data Transfer
>Import
Entity Type
toProducts
,Import Behavior
toAdd / Update
, select CSV file to import. (seePreconditions
)Expected result
The Products Inventory Source assignment should not change (should still be assigned to
Online Inventory
only.Actual result
The Products get assigned to the
Default
Inventory Source.Additional information
The problem lies in
\Magento\CatalogImportExport\Model\Import\Product::_saveStockItem
, which - regardless the Import CSV contains any Inventory changes or not - updates the Inventory.However, instead of getting the current Inventory settings, it calls
\Magento\CatalogImportExport\Model\Import\Product::getRowExistingStockItem
, which - under the hood - creates a new inventory entry 🤯 with default Website ID and its Stock:https://github.com/magento/magento2/blob/0b488dd1139e413cd5711241ae767030081805f6/app/code/Magento/CatalogImportExport/Model/Import/Product.php#L3435-L3440
Release note
No response
Triage and priority