[Vtigercrm-developers] Dates in workflow emails are defaulted to today

IT&M srl - Riccardo Guerriero riccardo.guerriero at itempd.it
Wed Jan 27 18:11:00 GMT 2016


Hi,
just wanted to know if a fix for this bug we found is available or planned.

What we found is that, if you add a DATE field (uitype 5) to a Workflow Send Mail body, the value for the given date field will be defaulted to the current date, if an empty value is set.
We have a couple of fields that sometimes have to stay empty, and the person that receives the workflow email isn't able to tell whether the date is actually today, or if it's empty.

We debugged here and there and we found that the constructor of class DateTimeField, found in:

	vtiger_root/fields/DateTimeField.php

Forces the current time value in case the value happens to be empty, on line 23:

	if(empty($value)) {
		$value = date("Y-m-d H:i:s");
       	}

Did anyone find a workaround for to have dates sent as-is in the workflow emails?

Thank you, 
Riccardo



More information about the vtigercrm-developers mailing list