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

IT&M srl - Riccardo Guerriero riccardo.guerriero at itempd.it
Thu Jan 28 08:26:34 GMT 2016


Hi Al,
in fact, the fields do default to empty when they are shown in any view of the CRM.

That's because most of those views get the display value of the field with the corresponding function found in the UI type file (in my case, modules/Vtiger/uitypes/Date.php).
That function, in case of empty value, returns an empty value (duh).

Instead, the VTSimpleTemplate.inc, found in modules/com_vtiger_workflow uses another getDisplayValue function, this time found in include/fields/DateTimeField.php , for whatever reason.
I can't edit any of those last two files, because I don't know if, when and how they are called. 

There probably is more than one function in the CRM that actually requires empty values to be translated to Today.

I was just wandering if anyone already had this issue, or if a fix is planned or something .-.

Thank you,
Riccardo

-----Messaggio originale-----
Da: vtigercrm-developers-bounces at lists.vtigercrm.com [mailto:vtigercrm-developers-bounces at lists.vtigercrm.com] Per conto di Alan Lord (News)
Inviato: mercoledì 27 gennaio 2016 20:09
A: vtigercrm-developers at lists.vtigercrm.com
Oggetto: Re: [Vtigercrm-developers] Dates in workflow emails are defaulted to today

On 27/01/16 18:11, IT&M srl - Riccardo Guerriero wrote:
> 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.

I don't know if this is still the case but in vtiger 5.4.0, when we used the vtlib API to add date fields, if you wanted a field which *didn't* default to today's date when you created a new record you could set the field's generatedtype property to "2".

I wonder if this would help?

Cheers

Al


--
Libertus Solutions
http://www.libertus.co.uk

_______________________________________________
http://www.vtiger.com/



More information about the vtigercrm-developers mailing list