Koha-clms/C4
Fridolyn SOMERS 357f22363c Bug 11254: make reservoir search normalize ISBNs
When importing records, the ISBN is normalized and stored
into database (see C4::ImportBatch::_add_biblio_fields).  But when
searching with ISBN into reservoir, it is not normalized
(see C4::Breeding::BreedingSearch).  So search does not match.

This patch adds the normalisation to reservoir search.  Also, it
replaces call private method _isbn_cleanup by GetNormalizedISBN,
the correct public method.  Also allows the reservoir search
on ISBN with hyphens.

This is intended to fix only reservoir searches.

Revised Test plan
-----------------
 1) Back up DB
 2) Save copy of attached example somewhere findable
 2) Home -> Tools -> Stage MARC records for import
 3) Click Browse and select the example MARC file
 4) Click Upload file
 5) Tweak as desired then click Stage for import
 6) Click Manage staged records
 7) Click Import this batch into the catalog
 8) Home -> Cataloging
 9) In the Cataloging search text box type 978-0-691-14289-0 and
     click Submit
    -- ISBN13 with hypens not found in reservoir
10) In the Cataloging search text box type 9780691142890 and
     click Submit
    -- ISBN13 without hypens not found in reservoir
11) In the Cataloging search text box type 0-691-14289-0 and
     click Submit
    -- ISBN10 with hypens not found in reservoir
12) In the Cataloging search text box type 0691142890 and
     click Submit
    -- ISBN10 without hypens found in reservoir
13) Apply patch
14) Repeat steps 9-12, this time it is always found! :)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit cac06afeb1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0ddc2b90f9)
2014-08-13 14:27:04 -04:00
..
AuthoritiesMarc Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
Barcodes Bug 6679 - [SIGNED-OFF] fix 6 perlcritic violations in C4/Barcodes/hbyymmincr.pm 2012-09-20 12:01:36 +02:00
ClassSortRoutine Bug 9770: fix sorting of Dewey call numbers that contain prefixes 2013-07-25 11:54:35 -03:00
Creators Bug 10763 - [SIGNED-OFF] Update POD of C4::Creators::Lib::html_table() to use TT syntax 2013-09-13 11:30:31 -03:00
External Bug 6679 - fix 12 perlcritic violations in C4/External/BakerTaylor.pm 2012-09-20 11:38:45 +02:00
Form Talking Tech Support - Phase I - Followup - Fix Messaging Preferences 2012-06-10 17:46:58 +02:00
Heading Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
ILSDI Bug 10667: Allow authentication with cardnumber for ILS-DI 2013-11-08 15:17:37 -03:00
Installer Bug 11757: remove dependency on POE 2014-06-06 07:28:18 -04:00
Labels Bug 11402: make Labels::_guide_box return undef if undefned data is passed 2014-02-07 12:39:17 -03:00
Linker Bug 8447: Make sure we have enough subfields for broader_headings 2012-09-14 14:56:48 +02:00
Members Bug 7919: Fix unit test (Members_AttributeTypes.t) 2012-12-07 18:26:37 -05:00
OAI Bug 6440: Implement OAI-PMH Sets 2012-03-20 11:38:26 +01:00
Output Fix FSF address in directory C4/ 2010-03-16 20:17:56 -04:00
Patroncards Bug 8315 - remove use C4::* version 2012-07-13 14:17:20 +02:00
Reports Bug 9659 - Better handling of non-existent authorised value categories used in SQL reports 2013-04-26 08:09:32 -04:00
SIP Bug 10445: (follow-up) fix error 2013-12-05 15:21:47 -03:00
Search Bug 5385: POD Cleanups (part 1) 2010-11-12 10:06:55 +13:00
Utils Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
VirtualShelves Bug 10466: fix glitch in OPAC display of titles saved to list 2013-07-02 14:09:41 -03:00
Accounts.pm Bug 9293 - action_logs not tracking payments 2013-03-11 17:59:17 -04:00
Acquisition.pm Bug 12438 - Bad encoding in acquisition basket 2014-08-13 09:03:25 -04:00
Auth.pm Bug 11715: Update POD for get_template_and_user 2014-06-26 06:32:21 -04:00
Auth_cas_servers.yaml.orig Bug 5630 CAS improvements 2011-10-13 10:49:49 +13:00
Auth_with_cas.pm Bug 10029 - CAS authentication fails in OPAC reserve 2013-07-15 20:09:32 -03:00
Auth_with_ldap.pm Bug 10925: fix LDAP auth failing if DEBUG is enabled 2013-11-13 14:08:33 -03:00
AuthoritiesMarc.pm Bug 10335: display translated forms of headings in UNIMARC authorities correctly 2013-12-02 15:09:41 -03:00
BackgroundJob.pm Bug 6679 - [SIGNED-OFF] fix 2 perlcritic violations in C4/BackgroundJob.pm 2012-09-20 12:01:40 +02:00
Barcodes.pm Bug 6679 - [SIGNED-OFF] fix 8 perlcritic violations in C4/Barcodes.pm 2012-09-20 12:01:36 +02:00
Biblio.pm Bug 11912: (refactoring followup) make GetMarcISBN implement its advertised API 2014-08-13 14:25:20 -04:00
Bookseller.pm Bug 10557: remove unused branch parameter from GetBooksellersWithLateOrders 2013-09-13 13:53:58 -03:00
Boolean.pm Bug 9827: remove 'insecure' system preference 2013-03-19 21:46:34 -04:00
Branch.pm Bug 10629: remove inappropriate uses of $sth->finish() in C4::Branch 2013-09-13 14:20:28 -03:00
Breeding.pm Bug 11254: make reservoir search normalize ISBNs 2014-08-13 14:27:04 -04:00
Budgets.pm Bug 10535: by default sort funds by name 2013-07-16 14:55:34 -03:00
Calendar.pm Bug 7351 : feature that allows to delete a range of dates 2012-09-28 12:19:45 +02:00
Category.pm Bug 7919: FIX the "all" categories method 2013-01-02 16:50:52 -05:00
Charset.pm Bug 11730: ensure that C4::Charset loads C4::Context 2014-06-06 07:34:55 -04:00
Circulation.pm Bug 11218: fix Item Due notices not being generated 2013-11-18 14:22:02 -03:00
ClassSortRoutine.pm Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
ClassSource.pm Bug 10643: fix inappropriate uses of $sth->finish() in C4::ClassSource.pm 2013-08-16 12:14:32 -03:00
Context.pm Bug 10611: (follow-up) cache DBMS driver code in context object 2014-06-06 07:20:28 -04:00
Contract.pm Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
Creators.pm Bug 8315 - remove use C4::* version 2012-07-13 14:17:20 +02:00
Csv.pm Bug 7986: Export issues for patron 2012-09-13 17:58:30 +02:00
Dates.pm Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
Debug.pm Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
HTML5Media.pm Bug 8377: Followup move style in a css file and do not pass template to a pm 2012-12-27 09:28:00 -05:00
Heading.pm Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
HoldsQueue.pm Bug 11258: fix another case where holds queue made transfer requests that contradict the library holds policy 2014-08-13 10:30:02 -04:00
Images.pm Bug 8710 - Don't show the images tab in the OPAC if the record has no local images 2012-11-28 18:54:40 -05:00
ImportBatch.pm Bug 11254: make reservoir search normalize ISBNs 2014-08-13 14:27:04 -04:00
ImportExportFramework.pm Bug 11666: remove SQL as an option for MARC framework exports and imports 2014-02-06 11:33:09 -03:00
Input.pm Bug 7919 : Display of values depending on the connexion library 2012-12-05 10:10:57 -05:00
Installer.pm Bug 9752: Set marcflavour to NORMARC when NORMARC is chosen 2013-03-30 22:51:17 -04:00
ItemCirculationAlertPreference.pm Bug 6679 - [SIGNED-OFF] fix 2 perlcritic violations in C4/ItemCirculationAlertPreference.pm 2012-09-20 12:01:39 +02:00
ItemType.pm Revert "Merge branch 'bug_6554' into 3.12-master" 2013-04-25 22:37:54 -04:00
Items.pm Bug 11416: fix case where serials item editor was incorrectly hiding fields 2014-08-13 10:39:14 -04:00
Koha.pm Bug 11279: (follow-up) remove unnecessary check on number of quotes 2014-02-07 12:13:03 -03:00
Labels.pm Bug 8315 - remove use C4::* version 2012-07-13 14:17:20 +02:00
Languages.pm Bug 8954: Make languages list in advanced search translatable (revision 1) 2012-11-20 14:39:56 -05:00
Letters.pm Bug 10843: fix crash that can occur when confirming hold if ReservesMaxPickUpDelay is undefined 2013-12-03 15:42:12 -03:00
Linker.pm Bug 7284: Fix unit test broken by erroneous POD 2012-03-08 15:24:18 +01:00
Log.pm Bug 7067 - OPAC Borrower Self Registration 2012-12-14 08:08:59 -05:00
Maintainance.pm Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
Matcher.pm Bug 10230: no need to use SimpleSearch for matching auths 2013-05-19 08:41:14 -04:00
Members.pm Bug 10481: (follow-up) fix typo in POD 2013-09-11 14:34:34 -03:00
Message.pm Bug 6679 - [SIGNED-OFF] fix 3 perlcritic violations in C4/Message.pm 2012-09-20 12:01:39 +02:00
NewsChannels.pm Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
Output.pm Bug 10016: force zero browser-side caching of SCO pages 2013-11-20 10:57:39 -03:00
Overdues.pm Bug 10030: QA Followup for trivial false warning detected while testing 2013-05-15 21:52:05 -04:00
Patroncards.pm Bug 8315 - remove use C4::* version 2012-07-13 14:17:20 +02:00
Print.pm Bug 6679 - [SIGNED-OFF] fix 2 perlcritic violations in C4/Print.pm 2012-09-20 12:17:43 +02:00
Ratings.pm Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
Record.pm Bug 11058: fix compilation warning in C4::Record 2013-12-05 11:16:57 -03:00
Reports.pm Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
Reserves.pm Bug 12079: ensure that CheckReserves() includes reserve_id in its response 2014-08-13 09:25:40 -04:00
Review.pm Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
Ris.pm Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
RotatingCollections.pm Bug 10642: fix inappropriate uses of $sth->finish() in C4::RotatingCollections.pm 2013-09-11 14:48:34 -03:00
SMS.pm Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
SQLHelper.pm Bug 6679 - [SIGNED-OFF] fix 3 perlcritic violations in C4/SQLHelper.pm 2012-09-20 12:01:38 +02:00
Scheduler.pm Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
Scrubber.pm Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
Search.pm Bug 9578: avoid a search crash when attempting to sort results of invalid query 2014-08-13 11:35:31 -04:00
Serials.pm Bug 10689: make public note appear in subscriptions search 2013-11-19 14:53:37 -03:00
Service.pm POD Cleanups 2010-06-09 08:38:59 -04:00
ShelfBrowser.pm Bug 6679 - [SIGNED-OFF] fix 4 perlcritic violations in C4/ShelfBrowser.pm 2012-09-20 12:01:37 +02:00
SocialData.pm bug 7470 follow-up, fix POD doc 2012-03-26 17:53:28 +02:00
Stats.pm Bug 4118 - Add Collection Code to Statistics Table 2012-09-13 18:42:46 +02:00
Suggestions.pm Bug 10072 - "my suggestions" always says "There are no pending purchase suggestions." 2013-04-19 23:17:06 -04:00
TTParser.pm Bug 5327 : Follow up for TTParser test 2012-07-12 16:06:21 +02:00
Tags.pm Bug 9136: C4::Tags not Plack-compatible 2012-12-22 15:47:48 -05:00
Templates.pm Bug 10560: make it possible for default interface language to not be English 2013-07-16 15:00:15 -03:00
TmplToken.pm Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
TmplTokenType.pm Revert "Bug 6679 - [SIGNED-OFF] fix 9 perlcritic violations in C4/TmplTokenType.pm" 2012-09-20 13:29:59 +02:00
UploadedFile.pm Bug 7941 : Fix version numbers in modules 2012-06-11 17:29:38 +02:00
Utils.pm Bug 6679 - [SIGNED-OFF] fix 2 perlcritic violations in C4/Utils.pm 2012-09-20 12:01:39 +02:00
VirtualShelves.pm Bug 11799: Housekeeping: Remove _biblionumber_sth from VirtualShelves.pm 2014-06-06 08:41:23 -04:00
XISBN.pm Bug 9726: XISBN service throttle not initialized 2013-03-30 22:05:15 -04:00
XSLT.pm bug 10292: improve fallback logic for picking XSLT 2013-06-04 12:40:21 -03:00