Skip to content

Product is being saved even when Special Price From Date is later than To Date using mass action #40113

@imran9935

Description

@imran9935

Preconditions (*)

Tested in this versions:

  1. Magento 2.4.8
  2. Magento Developer branch

Description (*)

When using the mass action feature to update product attributes, the system fails to properly validate the Special Price date fields. As a result, products are being saved even when the Special Price Start Date is later than the to Date.

Screenshot 1:

<img width="1924" height="923" alt="Image" src="https://github.com/user-attachments/assets/17630fc8-e94e-4ba7-a3f2-fca0095ac669" /]

Steps to reproduce (*)

  1. Access magento admin panel.
  2. Navigate to Catalog > Products to open the product grid.
  3. Select one or more products using the checkbox.
  4. From the Actions dropdown, choose Update Attributes.
  5. In the Special Price section, set the Special Price From Date to a date that comes after the Special Price To Date, then click Save. the product will be saved without any validation error

Expected result (*)

Product should not be saved when the Special Price From Date is set to a date after the Special Price To Date during mass action update. A validation error should be displayed .

Actual result (*)

Product is being saved successfully even when the Special Price From Date is set after the Special Price To Date, and no validation error is shown.

Additional information(*)

When navigating to the product edit page and setting the Special Price From Date to a date after the Special Price To Date, then it works properly, the product is not being saved, and a validation error message is displayed.

Screenshot 2:
[img width="1924" height="923" alt="Image" src="https://github.com/user-attachments/assets/61f253de-9fb2-49e2-9a80-d58e8f7144b7" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: PricingComponent: Mass Update attributesIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: PR CreatedIndicates that Pull Request has been created to fix issueReported on 2.4.8Indicates 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