[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 05:16:27 CEST 2022


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

--- Comment #9 from David Cook <dcook at prosentient.com.au> ---
(In reply to David Cook from comment #8)
> It looks like there's a new wrinkle in this one...
> 
> I was patching an older Koha that still used C4::Utils::DataTables::Members,
> but in master it looks like we're using the REST API, which I suspect will
> be much harder to change. But let's see...

I don't think that it's going to be possible to easily fix this with code in
master. 

Using literal SQL, it's possible to craft a search using DBIx::Class to do the
search[1], but we can't pass in that literal SQL via the API.

We could potentially inject the literal SQL within the API backend but it would
need to be in the Koha/REST/Plugin/Objects.pm helper... and it would involve
recursively navigating the data (more than it already is...), and that would
really just be a hack at that stage anyway. 


[1]
my $test = $rs->search(\[ "regexp_replace(phone,?,?) LIKE
?",'[^0-9]','','%1234%']);

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


More information about the Koha-bugs mailing list