[Koha-bugs] [Bug 23817] Normalize phone number when searching patrons

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Sep 14 07:18:36 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23817

David Cook <dcook at prosentient.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |In Discussion

--- Comment #12 from David Cook <dcook at prosentient.com.au> ---
(In reply to David Cook from comment #11)
> I do have one more idea that wouldn't involve changing the data...

There are some ways to provide additional columns to the DBIC query, but it
auto-escapes single quotes, which makes it impossible to use regexp_replace as
a derived column. Plus the DBIC search only works on real columns it seems
(which is a bit silly...)

--

I suppose another solution would be a pure Javascript solution that strips
anything but [\+0-9] out of the phone number field when saving and searching...

--

Another option would be a database trigger, but Koha has avoided those to date.

--

I suppose another idea would be to add a new phone number column called
"phone_normalized". That seems unnecessary though. 

--

Now I've spent quite a bit of time on this one, and I suspect it's going to go
nowhere, unfortunately.

There just isn't a good way to deal with this one using DBIC and the REST API I
reckon...

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list