[Vtigercrm-developers] vtiger 6.3.0 Reports on PBXManager
Alan Lord
alanslists at gmail.com
Tue Oct 16 08:32:22 GMT 2018
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
More information about the vtigercrm-developers
mailing list