Enable to use points that do not have a validity date

Created on 13 July 2023, over 1 year ago
Updated 8 July 2024, 5 months ago

Problem/Motivation

I saw that in the query where we get the available points for a customer, the validity is always checked for the current date:

$query->condition('field_validity_date.value', gmdate('Y-m-d'), '>=');

This means if I get points that the seller gave me and no validity date was set for it, I can never use that.

Steps to reproduce

Proposed resolution

This should be an < field > IS NULL OR < condition > in the query just like this:

    $validityCondition = $query->orConditionGroup();
    $validityCondition->notExists('field_validity_date.value');
    $validityCondition->condition('field_validity_date.value', gmdate('Y-m-d'), '>=');
    $query->condition($validityCondition);

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Fixed

Version

9.0

Component

Code

Created by

🇸🇰Slovakia kaszarobert

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024