Skip to content

Conditions and segments on date / datetime custom fields. #284

Open
@iakshay

Description

@iakshay

Mautic Version

4.2.x series

PHP version

7.4

What browsers are you seeing the problem on?

Chrome

What happened?

When using date field in campaigns conditions, it seems like special keywords like Today, Tomorrow do not work. Absolute values like 2022-10-14 do seem to work. I also tried creating a segment with date = Today and doesn't update contacts.

Also, date picker does not work for date fields in campaigns but works fine when creating segment using custom item fields.

How can we reproduce this issue?

  1. Create a custom object say Appointment
  2. Add a custom field of type Date to the object.
  3. Create an custom item of type Appointment with today's date in date picker.
  4. Link custom item to one of the contacts.
  5. Create a campaign that looks like -

image

image

6. Publish the campaign, rebuild and trigger the campaign.

Problem:
Campaign does not send confirmation email for contact with today's appointment. The same campaign works if the comparison is done using = 2022-10-14.

Relevant log output

No response

Code of Conduct

  • I confirm that I have read and agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions