[Vtigercrm-developers] vtiger 6.3.0 Reports on PBXManager
Alan Lord
alanslists at gmail.com
Tue Oct 16 09:36:36 GMT 2018
A couple more things I noticed during testing of this issue:
1. The Report query seems to only JOIN to Leads, Contacts and Accounts.
Other modules can, and do, have phone fields, esp. Vendors... But also
custom modules and when a phone field is added to any other common modules.
2. In ReportRun.php there are several occurrences of the deprecated
"split" function[1] on lines: 376, 377, 485, 526, 900, 1969, 2011, 3057,
3681, 3959, 3968, 4013 and 4453.
[1] According to the PHP on-line manual "This function was DEPRECATED in
PHP 5.3.0, and *REMOVED* in PHP 7.0.0. "
So what happens to reports if you are on php7?
Cheers
Al
On 16/10/18 09:32, Alan Lord wrote:
> There is a bug in the Report module if you try to run a report with a
> condition on the user.
>
> I just tested this on a vtiger 7.1. system and the bug is still present.
>
> If you want to filter a PBXManager report using the User field, i.e.
> show me all calls made my John Doe the Query Generator comes up with this:
>
>> Tue Oct 16 07:58:12 2018,871 [31381] INFO VT - PearDatabase ->ADODB
>> error Query Failed:
>>
>> select DISTINCT vtiger_pbxmanager.direction AS 'PBXManager_Direction',
>> vtiger_pbxmanager.starttime AS 'PBXManager_Start_Time',
>> vtiger_pbxmanager.customernumber AS 'PBXManager_Customer_Number',
>> (CASE WHEN vtiger_pbxmanager.customer NOT LIKE '' THEN (
>> CASE WHEN
>> trim(CONCAT(vtiger_leaddetailsRelPBXManager1482.firstname,'
>> ',vtiger_leaddetailsRelPBXManager1482.lastname)) NOT LIKE ''
>> THEN
>> trim(CONCAT(vtiger_leaddetailsRelPBXManager1482.firstname,'
>> ',vtiger_leaddetailsRelPBXManager1482.lastname)) WHEN
>> trim(vtiger_accountRelPBXManager1482.accountname) NOT LIKE ''
>> THEN trim(vtiger_accountRelPBXManager1482.accountname)
>> WHEN
>> trim(CONCAT(vtiger_contactdetailsRelPBXManager1482.firstname,'
>> ',vtiger_contactdetailsRelPBXManager1482.lastname)) NOT LIKE ''
>> THEN
>> trim(CONCAT(vtiger_contactdetailsRelPBXManager1482.firstname,'
>> ',vtiger_contactdetailsRelPBXManager1482.lastname)) ELSE
>> '' END) ELSE '' END) AS PBXManager_Customer,
>> vtiger_pbxmanager.callstatus AS 'PBXManager_Call_Status',
>> vtiger_pbxmanager.user AS 'PBXManager_User',
>> vtiger_crmentity.crmid AS "PBXManager_LBL_ACTION" from
>> vtiger_pbxmanager inner join vtiger_crmentity on
>> vtiger_crmentity.crmid=vtiger_pbxmanager.pbxmanagerid left join
>> vtiger_groups on vtiger_groups.groupid = vtiger_crmentity.smownerid
>> left join vtiger_users on vtiger_users.id =
>> vtiger_crmentity.smownerid left join vtiger_crmentity as
>> vtiger_crmentityRelPBXManager1482 on
>> vtiger_crmentityRelPBXManager1482.crmid = vtiger_pbxmanager.customer
>> and vtiger_crmentityRelPBXManager1482.deleted=0 left join
>> vtiger_leaddetails as vtiger_leaddetailsRelPBXManager1482 on
>> vtiger_leaddetailsRelPBXManager1482.leadid =
>> vtiger_crmentityRelPBXManager1482.crmid left join
>> vtiger_contactdetails as vtiger_contactdetailsRelPBXManager1482
>> on vtiger_contactdetailsRelPBXManager1482.contactid =
>> vtiger_crmentityRelPBXManager1482.crmid left join vtiger_account
>> as vtiger_accountRelPBXManager1482 on
>> vtiger_accountRelPBXManager1482.accountid =
>> vtiger_crmentityRelPBXManager1482.crmid WHERE
>> vtiger_pbxmanager.pbxmanagerid > 0 AND vtiger_crmentity.deleted=0
>> and (( (trim(CONCAT(vtiger_usersRelPBXManager1483.first_name,'
>> ',vtiger_usersRelPBXManager1483.last_name)) = 'John Smith') ) )
>> order by `PBXManager_Start_Time` DESC LIMIT 0, 1001
>> ::->[1054]Unknown column
>> 'vtiger_usersRelPBXManager1483.first_name' in 'where clause'
>
> This fails the same way in vtiger 7.1 as it does in vtiger 6.3.0
>
> There is no generateReportsSecQuery() method in the PBXManager or Users
> classes so I guess this will be a problem in the ReportRun.php
>
> Cheers
>
> Al
>
> _______________________________________________
> http://www.vtiger.com/
>
More information about the vtigercrm-developers
mailing list