Skip to content

Bulk API Product Update Unnecessarily Deletes & Re-adds Options #39652

Open
@gusdemayo

Description

@gusdemayo

Preconditions and environment

Magento 2.4

Steps to reproduce

When making a request to /rest/default/async/bulk/V1/products such as

[
	{
		"product": {
              	"sku": "12345",
                "price": 20.00,
                "options": [
                    {
                      	"product_sku": "12345",
                        "title": "UOM",
                        "type": "radio",
                        "is_require": false,
                        "values": [
                            {
                                "title": "Pack of 10",
                                "sort_order": 1,
                                "price": 0,
                                "price_type": "fixed",
                                "sku": "PK"
                            },
                            {
                          	"title": "Case of 100",
                                "sort_order": 2,
                                "price": 10.00,
                                "price_type": "fixed",
                                "sku": "CS"
                            }
                        ]
                }
    	    ]
  	}
    }
]

If I make the exact same request twice, changing nothing about the product options, it will completely remove the existing catalog_product_option table entry(ies) and re-create them, rather than only updating the changed data, and resorting to completely re-creating the options only when strictly necessary

Expected result

If I make a request to update a set of product options, it should preserve the options as much as possible & avoid affecting cart items with selected options

Actual result

It completely replaces existing options, even when no changes are made

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: CatalogArea: ProductComponent: CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Reported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    Status

    Ready for Development

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions