umbraco / Umbraco.Forms.Issues

Public issue tracker for Umbraco Forms
29 stars 0 forks source link

Email workflow incorrectly formatting dates #1214

Closed AlexAtVista closed 1 month ago

AlexAtVista commented 1 month ago

When using the "Send Email" workflow on a form that contains a date field, it appears in American date format and includes a time of 12am. It does not appear this way in the Umbraco Backoffice.

Reproduction

Versions

Umbraco.Cms: 13.2.0 Umbraco.Forms: 13.1.2

Steps to reproduce

  1. Create a blank form with a single date field image

  2. Add a "Send Email" workflow to this form image

  3. Navigate to a page with this form and submit any date value

  4. Check the form entry in backoffice is correctly showing the date value only image

  5. Check the received email is showing the incorrect date format image

Expected result

The date format in the email should match the appearance on the date in the backoffice, or be configurable by some other means.

The date string should not include a time value of "12:00:00 AM"

Actual result

Dates appear using the American date format and includes a time of "12:00:00 AM"

AndyButland commented 1 month ago

This workflow I would suggest is more for internal notification that anything that should be public facing (using the one that allows you to provide a template would likely be better for that, and would give you more control over the output).

That said, I see we can improve things here. Determining the ideal date format to use is a little tricky - as we don't know what the recipient would prefer - but at the very least we should make it unambiguous and remove the irrelevant time part.

So I'm proposing we'll resolve this to output as per the following example:

image

AndyButland commented 1 month ago

This will be part of the next round of releases.