https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23817 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #38 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to Kyle M Hall (khall) from comment #37)
Created attachment 192025 [details] [review] Bug 23817: Normalize phone number when searching
This patch rewrites the phone number DBIC query when sent from DataTables like in the Patron module.
Test plan: 0. Apply patch and koha-plack --restart kohadev 1. Go to http://localhost:8081/cgi-bin/koha/members/memberentry. pl?op=modify&destination=circ&borrowernumber=51 2. Input '1-(234)-567-8901' into the 'Primary phone' field 3. Note on the next screen the phone number is shown as '1-(234)-567-8901' 4. Go to http://localhost:8081/cgi-bin/koha/members/members-home.pl 5. Choose "Search field" of "All phones" 6. Search for '12345678901' 7. Note you are taken to http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=51 8. Try out different permutations like '234 567 8901' or '5678901' 9. Note that every permutation works to find the borrower
10. prove t/Koha/Patrons/DataTables.t
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Searching works for any variant that includes numbers and spaces, but fails once I include the dashes or parens, so the patron doesn't come up when I search for their phone number exactly as it appears in the record. Also, this normalization is not applied to the Standard search when Primary Phone is added to DefaultPatronSearchFields. Finally, the QA tools are mad about missing POD. [FAIL] Koha/Patrons/DataTables.pm FAIL pod_coverage sub _parse_dbic_query_for_dt has no pod coverage. -- You are receiving this mail because: You are watching all bug changes.