Details
-
Type: Improvement
-
Status: Won't Do
-
Priority: Major
-
Resolution: Won't Do
-
Affects Version/s: 4.7.15
-
Fix Version/s: None
-
Component/s: CiviCRM Search
-
Labels:None
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Contributed Code
-
Verified?:No
Description
Hello all,
I had a client who wanted to use "advanced search" to pull a record of all users who had a non-empty "fax" number (which is a phone number type).
We noticed that when going to "advanced search" and setting "Phone Type" to "Fax" that the result list only contained users who had "fax" numbers set as their primary phone number.
I phone I could fix this by changing line 2611 of /CRM/Contact]# vim BAO/Query.php
from:
$from .= " $side JOIN civicrm_phone ON (contact_a.id = civicrm_phone.contact_id AND civicrm_phone.is_primary = 1) ";
to:
$from .= " $side JOIN civicrm_phone ON (contact_a.id = civicrm_phone.contact_id) ";
Is this the best way to fix this? Does anyone know if this would cause other issues? Should this be added as a patch? I wouldn't want to do anything without someone who knows civi better taking a look at this.
Best,
Joel