MDVA-42584: Stock status of configurable product not updated automatically

The MDVA-42584 patch solves the issue where the stock status of the configurable product is not updated automatically when its simple product is updated. This patch is available when the Quality Patches Tool (QPT) 1.1.10 is installed. The patch ID is MDVA-42584. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.5.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.4.2-p2

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.4.2 - 2.4.2-p2
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

Stock status of the configurable product in the backend is not updated automatically when its simple product is set to In Stock through API or import.

Prerequisites:

MSI installed.

Steps to reproduce:

  1. Create a configurable product, InvCheck001, with two options: InvCheck001-M and InvCheck001-L.

  2. Both the simple products should have Quantity and they should be In Stock so that the configurable product is also In Stock in the backend.

  3. Now, update both simple products and set Quantity to 0 and Stock Status to Out of Stock.

  4. Refresh the configurable product and verify the stock status is updated to Out of Stock.

  5. Use the following API endpoint and set the simple product InvCheck001-M to In Stock with Quantity > 0.

    code language-json
    /rest/V1/inventory/source-items
    
    {
      "sourceItems":
      [
        {
          "sku": "InvCheck001-M",
          "source_code": "default",
          "quantity": 10,
          "status": 1
        }
      ]
    }
    
  6. Go to the backend and verify the quantity and stock status of the simple product InvCheck001-M. It is updated to In stock.

  7. Refresh the configurable product and check the stock status.

Expected results:

The stock status of the configurable product InvCheck001 in the backend is updated automatically to In Stock.

Actual results:

The stock status of the configurable product is still Out of Stock.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

For info about other patches available in QPT, refer to Patches available in QPT in our developer documentation.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a