Confiforms sends email with incorrect date format

Soley Gudmundsdottir September 17, 2021

Confuence v. 7.13.0 and Confiforms v. 2.19.2

My form sends an email at entry creation using IFTTT integration rules. The date is from a datepicker field but using the notation [entry.date] it transforms the date to a string?1631577600000 when sending an email with the entries in the bodu of the message. Using the macro to create Jira issue, correctly sends the date to Jira.

The form has been in use for 2 years and this worked fine during that time, but after a recent update, both Confluence and Confiforms, that changed.

Could you please advise on how to get the date in a correct format via email as well?

 

1 answer

1 vote
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 17, 2021

Hi

Are you using [entry.field_name] notation to retrieve your data field from the form's record or using ConfiForms Field?

If  (form some reason) you use [entry.field_name] then you access internal value, which is a timestamp

In this case I suggest to do something like

[entry.field_name.formatDate]

Of course you can format it to the pattern you want

https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions

Or switch to ConfiForms Field macro to retrieve values from a form in a "user presentable" format

[entry.field_name] are usually used when you want to do some transformations or create some file/document, or use it in filter parameters...

Alex

Butch_Richards May 8, 2023

@Alex Medved _ConfiForms_  in IFTTT on create send email formatDate  does not work still comes out as a string of numbers. Th

e linked documentation has no answers other than formatDate

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 8, 2023

Could you share the storage format of this page and the IFTTT macro configuration in particular?

Have you considered to use the ConfiForms Field macro instead?

Butch_Richards May 8, 2023

#if(${TargetTimeline}) Target Timeline [entry.TargetTimeline.formatDate(MM/YYYY)] #end

 

#if(${TargetTimeline}) Target Timeline [entry.TargetTimeline.formatDate(MM-YYYY)] #end

 

#if(${TargetTimeline}) Target Timeline [entry.TargetTimeline.formatDate] #end

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 8, 2023

It does not look like storage format, to be honest

And the pattern does not look right - https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html

Also, I have just did a quick test to verify the formatting patterns

http://recordit.co/slqUaSH5lx

Works fine...

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events