[Vtigercrm-developers] Filters and expressions

apcloic apcloic at gmail.com
Wed Feb 11 15:01:36 GMT 2015


Hi,

I'm trying to use expression for a custom view filter in standard Contacts
module, I'm using VT 6.1

I can't get this to work with standard Date fields (ex : 2015-02-11 like
"Support Start Date" field).

When saving filter with the following custom condition :

Support Start Date --> equals --> today

I've noticed that value field from vtiger_cvadvfilter is set to "--today"
and not "today". If I put the correct value directly in database, there is
no special error but it's not working at all.

However, it seems to be working for DateTime fields (ex : 2015-02-11
09:10:42 like "Modification Time" field) AFTER changing vtiger_cvadvfilter
value field from "--today 00:00:00" to "today 00:00:00" (or simply "today"
is working too).

Most of the time, when saving your custom filter, it returns the following
errors :

DateTime::__construct(): Failed to parse time string (--today) at position 0
(-): Unexpected character


DateTime::__construct(): Failed to parse time string (--today) at position 0
(-): Unexpected character
--today 00:00:00

When editing filter, even if value had been corrected in vtiger_cvadvfilter,
it display again "--today" as value and when saving, new value in database
is "today--"

It happens on 3 different vTiger 6.1 instance.

I've just tried with a brand new fresh VT 6.2 installation, same kind of
errors and still not working for standard date fields, however value stored
in database looks like "-today-" instead of "today--"

Any idea ?

Regards,











--
View this message in context: http://vtiger-crm.2324883.n4.nabble.com/Vtigercrm-developers-Filters-and-expressions-tp10106p15304.html
Sent from the vtigercrm-developers mailing list archive at Nabble.com.


More information about the vtigercrm-developers mailing list