Page MenuHomePhabricator

Enable ability to look up contacts by phone number
Closed, ResolvedPublic1 Story Points

Description

Good gracious....I have a voicemail with a phone number, but no name. In a world where databases work properly, we should be able to input the number and get the related contact (assuming the number is in the system, of course.), right?

Related Objects

StatusAssignedTask
Resolvedmepps
ResolvedNone
Resolvedawight
Resolvedawight
Declinedawight
Invalidawight
Resolvedawight
Resolvedawight
Resolvedawight
Resolvedawight
OpenNone
Resolvedawight
Resolvedawight
Resolvedawight
Resolvedawight
ResolvedEileenmcnaughton
Resolvedawight
Resolvedawight
ResolvedEileenmcnaughton
ResolvedNone
ResolvedEileenmcnaughton
ResolvedEileenmcnaughton
ResolvedEileenmcnaughton
ResolvedNone
Resolvedawight
ResolvedDStrine
ResolvedEileenmcnaughton
DeclinedEileenmcnaughton
Resolvedawight
Resolvedawight
Resolvedawight
Resolvedawight
OpenEileenmcnaughton
ResolvedNone
Resolvedawight
Resolvedawight
ResolvedNone
ResolvedEileenmcnaughton
ResolvedEileenmcnaughton
ResolvedEileenmcnaughton
ResolvedEjegg
ResolvedEileenmcnaughton
ResolvedEileenmcnaughton
ResolvedEileenmcnaughton
ResolvedEileenmcnaughton
ResolvedEileenmcnaughton
InvalidEileenmcnaughton
ResolvedEileenmcnaughton
ResolvedEileenmcnaughton
ResolvedEileenmcnaughton
DuplicateEileenmcnaughton
InvalidEileenmcnaughton
ResolvedJgreen
OpenNone
OpenNone
OpenNone
Resolvedawight
ResolvedEileenmcnaughton
OpenNone
ResolvedEileenmcnaughton
Resolvedawight
DeclinedNone
Declinedawight
ResolvedEileenmcnaughton
OpenEileenmcnaughton
Resolvedawight
Resolvedhashar
ResolvedXenoRyet
Resolvedawight
ResolvedEileenmcnaughton
OpenNone
OpenNone
OpenNone
ResolvedEileenmcnaughton
ResolvedEileenmcnaughton
OpenNone
DuplicateNone
ResolvedEileenmcnaughton
OpenNone
OpenNone
Resolvedawight
ResolvedEileenmcnaughton
Resolvedawight
ResolvedEileenmcnaughton
Resolvedawight
Resolvedawight
Resolvedawight
Resolvedawight

Event Timeline

CaitVirtue raised the priority of this task from to Needs Triage.
CaitVirtue updated the task description. (Show Details)
CaitVirtue added subscribers: CaitVirtue, RLewis, Ejegg, atgo.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 27 2015, 11:51 PM
awight added a subscriber: awight.Apr 28 2015, 1:17 AM

This is really surprising. From what I can tell, this feature is added in CiviCRM 4.4, at least, but is not available in 4.2.

atgo triaged this task as Low priority.Apr 28 2015, 8:57 PM

Making this "low" priority and adding the civi upgrade as a blocking task. @CaitVirtue please adjust if I've got the priority wrong here.

atgo set Security to None.Mar 30 2016, 10:09 PM
atgo removed a subscriber: atgo.
DStrine closed this task as Resolved.May 4 2017, 7:19 PM

This may be user error, but can @DStrine explain to me how this feature works? I'm not having success looking myself up by my cell number which is in my personal record.

DStrine reopened this task as Open.May 5 2017, 5:38 PM

You can technically look up some phone numbers but not all. If there is any formatting in the number field, you can't search for that number.

steps:

  • find a record with a phone number that only has numbers in the field, like this: xxxxxxxxxx
  • You can find that record by searching for any of the following formats:
    • xxxxxxxxxx
    • (xxx) xxx-xxxx
    • xxx-xxx-xxxx
  • Result: these will all return the correct record
  • Now try looking up any record that has a phone number with some other formatting in it like:
    • (xxx) xxx-xxxx or xxx-xxx-xxxx
  • Try searching for that record in any of the formats above
  • Result: you cannot find the record at all

Expected result: any number saved with any formatting can be looked up with any formatting.

What's the difference between (cut and pasted from previous comment)

(xxx) xxx-xxxx

and

(xxx) xxx-xxxx

??

I ask because, we can definitely set up data entry procedures to ensure that moving forward numbers are entered in a format that is currently searchable. Further, we might be able to en masse reformat phone numbers currently in the database.

I'm not going to speculate exactly where the breakdown is in the system but if the record is saved as xxxxxxxxxx it can be found. But if there is any formatting in the number, it can't.

We have tons of records in the database that are in many different formatting configurations so changing your methods now won't help much. I'd rather make it easy for a user to search in any configuration.

mepps added subscribers: cwdent, mepps.EditedMay 5 2017, 8:44 PM

@DStrine This appears to be an issue of a missing trigger on our specific setup of CiviCRM. @cwdent is going to rerun the triggers script on dev to see if that resolves the issue.

mepps added a comment.May 5 2017, 8:46 PM

@Ejegg notes that we will then need to batch update the numbers already saved in the database.

Ejegg added a comment.May 9 2017, 7:12 PM

Looks like the triggers are actually there now, but might have been missing for a while in the past. We should just run the update, I guess.

Ejegg assigned this task to mepps.May 9 2017, 7:35 PM
Ejegg moved this task from Triage to Old Unscheduled (prior to 2019) on the Fundraising-Backlog board.
Ejegg set the point value for this task to 1.

Change 352893 had a related patch set uploaded (by Mepps; owner: Mepps):
[wikimedia/fundraising/crm@master] Add update_7522 to allow for search by phone number Bug: T97372

https://gerrit.wikimedia.org/r/352893

Change 352897 had a related patch set uploaded (by Mepps; owner: Mepps):
[wikimedia/fundraising/crm@master] Add update_7522 to allow for search by phone number Bug: T97372

https://gerrit.wikimedia.org/r/352897

Change 352893 abandoned by Mepps:
Add update_7522 to allow for search by phone number Bug: T97372

Reason:
Bugs fixed in https://gerrit.wikimedia.org/r/352897

https://gerrit.wikimedia.org/r/352893

Change 352940 had a related patch set uploaded (by Mepps; owner: Mepps):
[wikimedia/fundraising/crm@master] Add update_7522 to allow for search by phone number Bug: T97372

https://gerrit.wikimedia.org/r/352940

Change 352943 had a related patch set uploaded (by Mepps; owner: Mepps):
[wikimedia/fundraising/crm@master] Add update_7522 to allow for search by phone number Bug: T97372

https://gerrit.wikimedia.org/r/352943

Change 352897 abandoned by Mepps:
Add update_7522 to allow for search by phone number Bug: T97372

Reason:
Mistake, see https://gerrit.wikimedia.org/r/#/c/352943/

https://gerrit.wikimedia.org/r/352897

Change 352940 abandoned by Mepps:
Add update_7522 to allow for search by phone number Bug: T97372

Reason:
Mistake, see https://gerrit.wikimedia.org/r/#/c/352943/

https://gerrit.wikimedia.org/r/352940

Change 352943 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Add update_7522 to allow for search by phone number Bug: T97372

https://gerrit.wikimedia.org/r/352943

@Jgreen or @Cdentinger , can you please grant the civi user execute permission on this function: civicrm_strip_non_numeric

I guess that explains why the triggers haven't been keeping that column updated! Surprised we didn't get any errors.

@Jgreen or @Cdentinger , can you please grant the civi user execute permission on this function: civicrm_strip_non_numeric
I guess that explains why the triggers haven't been keeping that column updated! Surprised we didn't get any errors.

Done, hopefully. I haven't dealt with function permissions before, so let me know if it worked as intended.

Ejegg added a comment.May 16 2017, 7:09 PM

Great, this ran without an issue now!

@CaitVirtue, I tried a couple of searches, and searching for 'primary' phone numbers is working great. I can't seem to get results for non-primary phone numbers. I'm looking into the code to see if there's a way to get those.

mepps added a comment.May 17 2017, 2:46 PM

@Ejegg I've been looking too and so far this is what I've found: https://civicrm.org/extensions/any-telephone-or-email

mepps added a comment.May 17 2017, 2:55 PM

@Ejegg actually I found this: https://issues.civicrm.org/jira/browse/CRM-4287, looks like the fix in 4.7.18 and we're on 4.7.15

Aha! I think @Eileenmcnaughton is working to get us up to speed on the very latest.

ggellerman closed this task as Resolved.May 24 2017, 10:32 PM
mmodell removed a subscriber: awight.Jun 22 2017, 9:33 PM