magento / inventory

Magento Inventory Project (a.k.a MSI)
Open Software License 3.0
337 stars 247 forks source link

Products stock status issues with Out-of-Stock Threshold #3061

Open Jitheesh opened 4 years ago

Jitheesh commented 4 years ago

Preconditions (*)

  1. Magento Commerce 2.3.5
  2. MSI modules enabled
  3. PHP 7.2

Steps to reproduce (*)

  1. Make sure MSI modules are enabled
  2. Make sure default stock is configured
  3. Configure Out-of-Stock Threshold value as 10
  4. Create products and set inventory as 11
  5. Check FE - Product should be in stock
  6. Change product qty to 10 and save - Product become out of stock
  7. Now change Out-of-Stock Threshold value to 8 from store configuration
  8. Open product, it will be in stock in BE
  9. Check product on FE, it will be out of stock
  10. Check cataloginventory_stock_item table - product will be in stock
  11. check inventory_source_item table, status will be 0

Expected result (*)

  1. Product stock status should be updated based on Out-of-Stock Threshold configuration change

Actual result (*)

  1. Only cataloginventory_stock_item table is updating based on Out-of-Stock Threshold change

Debug info

  1. admin_system_config_changed_section_cataloginventory Observer is working fine https://github.com/magento/magento2/blob/6b6f428c4b938c209658eb5d75d84b72503cbce0/app/code/Magento/CatalogInventory/etc/events.xml#L40 That's how cataloginventory_stock_item table is updating as expected
  2. There is no observer or Plugin to update MSI inventory tables based on Out-of-Stock Threshold change
m2-assistant[bot] commented 4 years ago

Hi @Jitheesh. 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.

@Jitheesh do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?


m2-assistant[bot] commented 4 years ago

Hi @swathishs. 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:

swathishs commented 4 years ago

@magento give me 2.4-develop instance

magento-engcom-team commented 4 years ago

Hi @swathishs. Thank you for your request. I'm working on Magento 2.4-develop instance for you

magento-engcom-team commented 4 years ago

Hi @swathishs, here is your Magento instance. Admin access: https://i-28120-2-4-develop.instances.magento-community.engineering/admin_2788 Login: e629370f Password: 68e685e5773a Instance will be terminated in up to 3 hours.

swathishs commented 4 years ago

Hi @Jitheesh,2 all issue specific for MSI should be reported in the MSI repo

fyi: @sidolov @smoskaluk @sdzhepa

It seems this issue MSI specific and should be fixed in MSI repository.

EngCom team, please confirm and transfer this issue to the https://github.com/magento/inventory/issues

Closing this issue

m2-assistant[bot] commented 4 years ago

Hi @Jitheesh. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


smoskaluk commented 4 years ago

Hi @Jitheesh ! I can't reproduce your issue. Did you do re-index and cache flush after changing your configuration - out of stock threshold value?

JainamDeveloper commented 5 months ago

create multi-source and then try it will show you @smoskaluk