[Vtigercrm-commits] [Vtiger development] #8591: Filter on numeric values not working

Vtiger development vtiger-tickets at trac.vtiger.com
Tue Jun 30 21:33:47 GMT 2015


#8591: Filter on numeric values not working
-----------------------+------------------------
 Reporter:  direzione  |      Owner:  developer
     Type:  defect     |     Status:  new
 Priority:  major      |  Milestone:  Unassigned
Component:  vtigercrm  |    Version:  6.3.0
 Severity:  High       |   Keywords:
-----------------------+------------------------
 Filters with a condition "greater than" (or > < >=) against a numeric
 field looks like the condition is made against the value 0.

 To reproduce: Create a filter on the module leads on the field "No Of
 Employee" greater than 5. The result are all the leads with No Of Employee
 > than 0.

 Looking at the code the issue seems in file
 include/QueryGenerator/QueryGenerator.php

 at line 1027

                         } else   if(in_array($field->getFieldDataType(),
 $inEqualityFieldTypes)){
                 if ($operator == 'g' || $operator == 'l') {
                     $value = substr($value, 4);
                 } else if ($operator == 'h' || $operator == 'm') {
                     $value = substr($value, 5);
                 }

 Look to me that the two substr statements break the condition, in fact
 commenting these line seems resolved but may be that this break something
 else.

--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/8591>
Vtiger development <http://trac.vtiger.com/>
Vtiger CRM


More information about the vtigercrm-commits mailing list