MDVA-42046: Incorrect value assigned for product attribute

The MDVA-42046 patch fixes the issue where an incorrect value is assigned for the product attribute while updating a product that has a date input field. This patch is available when the Quality Patches Tool (QPT) 1.1.13 is installed. The patch ID is MDVA-42046. 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.3.4 - 2.3.5-p2 and 2.4.0 - 2.4.4
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.


After saving a product with news_from_date and/or news_to_date fields, the values from those fields reset to default.

Steps to reproduce:

  1. Create a simple product.
  2. Export the product created in step one.
  3. In the exported CSV file, put some values in the news_from_date and news_to_date fields. For example, 2021-05-15 and 2021-06-18.
  4. Import the product using the modified CSV file.
  5. Add additional columns “Set Product as New from Date” and “Set Product as New to Date” to the product grid.
  6. Open the edit page for the product, and without any changes, click Save.
  7. Go back to the product grid and check the data for the product.

Expected results:

Both “Set Product as New from Date” and “Set Product as New to Date” are the same as before saving.

Actual results:

  • Values in the “Set Product as New from Date” and “Set Product as New to Date” columns are changed.

  • The “Set Product as New from Date” column shows the current date, and the “Set Product as New to Date” column is empty.

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.