[OPEN-ILS-DEV] Patron Search - minor enhancement.
Peters, Michael
MRPeters at library.IN.gov
Wed May 4 13:12:25 EDT 2011
Here this is, in patch form as well. Applies against rel_2_0 branch.
Sincerely,
Michael Peters
Indiana State Library MIS | Inspire.IN.gov Helpdesk | Evergreen Indiana Helpdesk
office - 317.234.2128
email - mrpeters at library.in.gov
-----Original Message-----
From: open-ils-dev-bounces at list.georgialibraries.org [mailto:open-ils-dev-bounces at list.georgialibraries.org] On Behalf Of Niles Ingalls
Sent: Wednesday, May 04, 2011 12:45 PM
To: Evergreen Development Discussion List
Subject: [OPEN-ILS-DEV] Patron Search - minor enhancement.
I'd like to submit this patch, which will improve patron phone search results (at least for my purposes).
This patch will do a match against digits only, when the search method is given a search string that only contains digits.
Results will be improved in cases situations where number validation is loose, or where you have some legacy records that weren't fully washed.
/openils/lib/perl5/OpenILS/Application/Storage/Publisher/actor.pm
666c666,670
< push @ps, "evergreen.lowercase($p) ~ ?";
---
> if ($pv =~ /^\d+$/) {
> push @ps, "evergreen.lowercase(REGEXP_REPLACE($p, '[^0-9]', '', 'g')) ~ ?";
> } else {
> push @ps, "evergreen.lowercase($p) ~ ?";
> }
Niles Ingalls
UNIX & Web Administrator
Hussey-Mayfield Memorial Public Library
250 N. Fifth Street
P.O. Box 840
Zionsville, IN. 46077
Phone 317-873-3149 x13280
Fax 317-873-8339
"Confidence is what you have before you understand the problem." - Woody Allen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: actor.pm.patch
Type: application/octet-stream
Size: 548 bytes
Desc: actor.pm.patch
Url : http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20110504/87cb698a/attachment.obj
More information about the Open-ils-dev
mailing list