Workflow - Email action doesn't parse datetime field format and timezone correctly #4929

Open
opened 2026-02-20 16:26:26 -05:00 by deekerman · 0 comments
Owner

Originally created by @SinergiaCRM on GitHub (Jan 18, 2023).

When having a Workflow action that sends an email with a datetime field in its email template, the datetime value of the email received isn't parsed correctly (timezone and format) if the action is run from a modified record.
DateTimeFieldWFEmail

The result is the value in DB format and UTC.

Issue

Action Emails doesn't parse datetime/date fields correctly

Expected Behavior

It should be parsed in user's format, as in Email Campaigns

Actual Behavior

DB format and UTC is received

Possible Fix

Parse the date fields using current user preferences before sending the email.

Steps to Reproduce

  1. Create a Datetime Field in Contacts module
  2. Create an Action that send an email to a modified Contact. Add the Datetime field in the email
  3. Create a Contact filling the Datetime field
  4. Modify the Contact record to make the Workflow run and receive the email
  5. Check that the email has the wrong datetime value format

Context

This can be confusing for users receiving the email, specially if it's in UTC.

Your Environment

  • SuiteCRM Version used: 7.12.8
  • Browser name and version: Versión 107.0.5304.121 (Build oficial) (64 bits)
  • Environment name and version: MariaDB 10.6.5, PHP 7.4
  • Operating System and version : KDE Neon 5.26
Originally created by @SinergiaCRM on GitHub (Jan 18, 2023). When having a Workflow action that sends an email with a datetime field in its email template, the datetime value of the email received isn't parsed correctly (timezone and format) if the action is run from a modified record. ![DateTimeFieldWFEmail](https://user-images.githubusercontent.com/61022311/213235180-0d105f02-7697-4fbf-8e03-090a60344484.gif) The result is the value in DB format and UTC. #### Issue Action Emails doesn't parse datetime/date fields correctly #### Expected Behavior It should be parsed in user's format, as in Email Campaigns #### Actual Behavior DB format and UTC is received #### Possible Fix Parse the date fields using current user preferences before sending the email. #### Steps to Reproduce <!--- Provide a link to a live example, or an unambiguous set of steps to --> <!--- reproduce this bug include code to reproduce, if relevant --> 1. Create a Datetime Field in Contacts module 2. Create an Action that send an email to a modified Contact. Add the Datetime field in the email 3. Create a Contact filling the Datetime field 4. Modify the Contact record to make the Workflow run and receive the email 5. Check that the email has the wrong datetime value format #### Context This can be confusing for users receiving the email, specially if it's in UTC. #### Your Environment <!--- Include as many relevant details about the environment you experienced the bug in --> * SuiteCRM Version used: 7.12.8 * Browser name and version: Versión 107.0.5304.121 (Build oficial) (64 bits) * Environment name and version: MariaDB 10.6.5, PHP 7.4 * Operating System and version : KDE Neon 5.26
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#4929
No description provided.