Emails Sent via WorkFlow showing only date, but not time of meeting

Dear Friends,

I have created a normal Email Template (Type: Email)

When I do sent email using normal send email functionality, it does correctly show the date & time of the meeting or any other date/time field of related module.

However, we I choose the same template and send email via workflow, it shows only date, but not time of meeting or any other date/time field of related module.

I seek your guidance in finding the solution of it.

Kindly instruct me about how to solve it.

With thanks,

RK

This looks like a bug, try to set your logs in debug mode and see what’s happening when is working and when is not

best regards

Dear Mike,

Here is the visual of what is happening.

I have created a normal Email Template (Type: Email)

When I do sent email using normal send email functionality, it does correctly show the date & time of the meeting or any other date/time field of related module.

I also created a workflow to send it when some condition is true.

However, when I choose the same template and send email via workflow, it shows only date, but not time of meeting or any other date/time field of related module.

You can observe that there is difference in date format also, as it has changed from dd-mm-yyyy to yyyy-mm-dd.

Lately, I have made the changes mentioned in fix at URL: https://github.com/salesagility/SuiteCRM/pull/2562/commits/d9d213b2cf7133562d172301cc6707aff598fcf1 but I am not sure if that is the culprit.

B) One more little info: There is an additional action in workflow to automatically create the meeting. Can that have some more influence on what is happening above.

I solicit your help as to solve it, as it is very important for me to trigger this template via workflow.

With thanks,

RK

There are two PHP configurations on your server, one is CLI (used from the command-line, so that’s what the cron entry that executes workflows is going to use), the other is used by the Web server (the rest of the SuiteCRM app runs from here).

Each has his own php.ini configuration file.

Run this on your server:

sudo find / -name php.ini

… to see a list of all php.ini’s on your system.

Each has it’s own “datetime” format setting. I would explore those settings to see about the different formats.

Hello,

Since I am testing everything on localhost, before bringing the new WorkFlow to live website, I have checked that there is only one file php.ini at localhost.

When I search for string ‘datetime’, I found the following snippet only:

;mssql.datetimeconvert = On

I tried after unchecking it, but there was no change in the email sent.

And there I could not find any php-cli

What is next piece of advice?

With thanks,

RK

Dear Mike,

I have enclosed the logs for around duration of 1-2 minutes when I tried to trigger workflow again.

WorkFlow: Demo Schedule Email-1 v2
WorkFlow ID: abebaa74-524a-f6af-9b6c-5829bbbc0875

I could observe that around the line 383 or 384, the action from workflow was called. But I could not figure out or find the error.

Kindly spare a minute and suggest the solution.

With thanks,

RK

Dear Mikeback,

Please spare some time and guide me how to solve the problem I am facing.

In the meantime, I have raised an issue at github: Fix #1366 should be replicated for template parsing when sending emails via workflow

However, your response would assist in solving the problem quicker than the solution they may or may not propose.

With thanks,

RK

I have found that the file which is parsing the email templates in WorkFlows, i.e., templateParser.php in folder /modules/AOW_actions/actions/.
This file also calls forth the file: templateParser.php from the folder modules/AOS_PDF_Templates/.

Probably the interplay of these two files is resulting in the datetime field in format: yyyy-mm-dd or ymd.

Can any experience coder suggest me the changes, so that the datetime field in format: dd-mm-yyyy or dmy with TIME?

Here is example snapshot of what I require as the output in email sent:

With thanks,

RK

hello developers.
Did you solve this issues?
I want to change date format. currently it is giving Y-m-d and I want to change into d.m.Y

@jrawoot Please check if this solution works for you:

And

Thanks

RK

Can we extend this files?

I note that those “soluitions” don’t have a PR for them. This way it is very hard that they will receive any attention in the midst of so many other things going on in Github…

Can one of you create a PR with a working solution?