[Vtigercrm-commits] [vtiger development] #7197: Account mail export not working with filters and doesn't exclude deleted contacts

vtiger development vtiger-tickets at trac.vtiger.com
Thu Nov 3 18:59:16 PDT 2011


#7197: Account mail export not working with filters and doesn't exclude deleted
contacts
-----------------------+----------------------------------------------------
 Reporter:  perb       |       Owner:  developer            
     Type:  patch      |      Status:  new                  
 Priority:  minor      |   Milestone:  Unassigned           
Component:  vtigercrm  |     Version:  5.2.1                
 Severity:  Medium     |    Keywords:  MailerExport, Account
-----------------------+----------------------------------------------------
 The Account/ email-exporter has a problem when using an additional filter
 for "assigned-to".
 The SQL-statement is missing necessary joins to the user and group tables.

 Furthermore is the exporter not correctly excluding deleted contacts
 caused of a wrong ordering of the joins.
 Apply to all current vtiger versions.
 Attached a patched MailerExport.php

 LINE 156ff:

 SELECT crmentity.crmid, contactdetails.contactid,
 contactdetails.salutation, contactdetails.firstname,
 contactdetails.lastname, contactdetails.email  FROM vtiger_account
 INNER JOIN vtiger_accountbillads ON
 vtiger_account.accountid=vtiger_accountbillads.accountaddressid
 INNER JOIN vtiger_accountshipads ON
 vtiger_account.accountid=vtiger_accountshipads.accountaddressid
 INNER JOIN vtiger_accountscf ON vtiger_account.accountid =
 vtiger_accountscf.accountid
 INNER JOIN vtiger_contactdetails contactdetails ON
 vtiger_account.accountid = contactdetails.accountid
 INNER JOIN vtiger_crmentity crmentity ON crmentity.crmid =
 contactdetails.contactid
 INNER JOIN vtiger_contactscf contactscf ON contactscf.contactid =
 contactdetails.contactid
 LEFT OUTER JOIN vtiger_users ON crmentity.smownerid = vtiger_users.id
 LEFT OUTER JOIN vtiger_groups ON crmentity.smownerid =
 vtiger_groups.groupid
 WHERE crmentity.deleted=0 AND contactdetails.email != '' ".$where;



 Cheers,
 Per

-- 
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7197>
vtiger development <http://trac.vtiger.com/>
vtigerCRM



More information about the vtigercrm-commits mailing list