[Vtigercrm-developers] Don't Change the entityfield for Users... [WAS Re: BUG: UI10 with more than 1 target breaking filters...?}

Mariusz Krzaczkowski m.krzaczkowski at yetiforce.com
Tue Jun 2 10:41:59 GMT 2015


 

Thanks Alan for your fix, I'm sure it will be useful, I have already
added it to the system 
---

Z poważaniem / Regards 

MARIUSZ KRZACZKOWSKI 
_Director of Product Development_ 
M: +48 884-998-123
E: m.krzaczkowski at yetiforce.com 
-------------------------

We created an innovative open source project called YetiForceCRM. You
can test it here [3], download [4] it for free or read its documentation
[5]. Follow us on Twitter [6] to get real-time info about new
functionalities and articles. 

W dniu 2015-06-02 11:42, Alan Lord napisał(a): 

> On 01/⁠06/⁠15 16:47, Mariusz Krzaczkowski wrote: 
> 
>> Alan had a good idea, suggested on your idea and I corrected it. see:
>> 
>> https://github.com/YetiForceCompany/YetiForceCRM/blob/master/include/QueryGenerator/QueryGenerator.php#L721 [1]
> 
> Thanks for the cluebat :-⁠)
> 
> I have also fixed the bit just below it so that if you want to filter a column and the Users Module's entityfield is _not_ set to first_name,last_name works too (it's around line 744):
> 
>> } elseif (in_array($fieldName, $this-⁠>ownerFields)) {
>> if($fieldName == 'created_user_id'){
>> $concatSql = getSqlForNameInDisplayFormat(array('first_name'=>"vtiger_users$fieldName.first_name",'last_name'=>"vtiger_users$fieldName.last_name"), 'Users');
>> $fieldSql .= "$fieldGlue (trim($concatSql) $valueSql)";
>> }else{
>> $entityFields = Vtiger_Functions::getEntityModuleInfoFieldsFormatted('Users');
>> if(count($entityFields['fieldname']) > 1) {
>> $columns = array();
>> foreach($entityFields['fieldname'] as $i => $fieldname) {
>> $columns[$fieldname] = $entityFields['tablename'] . '.' . $fieldname;
>> }
>> $concatSql = getSqlForNameInDisplayFormat($columns, 'Users');
>> $fieldSql .= "$fieldGlue (trim($concatSql) $valueSql OR "."vtiger_groups.groupname $valueSql)";
>> } else {
>> $columnSql = $entityFields['tablename'] . '.' . $entityFields['fieldname'];
>> $fieldSql .= "$fieldGlue (trim($columnSql) $valueSql OR "."vtiger_groups.groupname $valueSql)";
>> }
>> }
> 
> Cheers
> 
> Al
> 
> _______________________________________________
> http://www.vtiger.com/ [2]
 

Links:
------
[1]
https://github.com/YetiForceCompany/YetiForceCRM/blob/master/include/QueryGenerator/QueryGenerator.php#L721
[2] http://www.vtiger.com/
[3] https://test.yetiforce.com/
[4] https://github.com/YetiForceCompany/YetiForceCRM
[5] https://yetiforce.com/en/documentation.html
[6] https://twitter.com/YetiForceEN
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150602/2a4f3d0b/attachment.html>


More information about the vtigercrm-developers mailing list