[Vtigercrm-developers] BUG: UI10 with more than 1 target breaking filters...?
Alan Lord
alanslists at gmail.com
Thu May 21 15:51:31 GMT 2015
On 21/05/15 16:41, Alan Lord wrote:
> I think I have found a nasty bug in vtiger filters in 6.2.0
>
> Can one of the devs suggest the right place to fix this? Looking at the
> code in the QueryGenerator for any length of time tends to make my head
> hurt ;-)
Something is going wrong in this chunk of code in the QueryGenerator
(around lines 710 - 740
> foreach($moduleList as $module) {
> $nameFields = $this->moduleNameFields[$module];
> $nameFieldList = explode(',',$nameFields);
> $meta = $this->getMeta($module);
> $columnList = array();
> foreach ($nameFieldList as $column) {
> if($module == 'Users') {
> $instance = CRMEntity::getInstance($module);
> $referenceTable = $instance->table_name;
> if(count($this->ownerFields) > 0 ||
> $this->getModule() == 'Quotes') {
> $referenceTable .= $fieldName;
> }
> } else {
> $referenceField = $meta->getFieldByColumnName($column);
> $referenceTable = $referenceField->getTableName().$fieldName;
> }
> if(isset($moduleTableIndexList[$referenceTable])) {
> $referenceTable = "$referenceTable$fieldName";
> }
> $columnList[] = "$referenceTable.$column";
> }
> if(count($columnList) > 1) { *<<<<HERE<<<<*
> $columnSql = getSqlForNameInDisplayFormat(array('first_name'=>$columnList[0],'last_name'=>$columnList[1]),'Users');
> } else {
> $columnSql = implode('', $columnList);
> }
>
> $fieldSql .= "$fieldGlue trim($columnSql) $valueSql";
> $fieldGlue = ' OR';
> }
> }
More information about the vtigercrm-developers
mailing list