[Bug 11254] New: breeding search must normalize ISBN
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11254 Bug ID: 11254 Summary: breeding search must normalize ISBN Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Tools Assignee: gmcharlt@gmail.com Reporter: fridolyn.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org When importing records, the ISBN is normalized and stored into database (see C4::Breeding::ImportBreeding). But when searching with ISBN into reservoir, it is not normalized (see C4::Breeding::BreedingSearch). So search does not match. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11254 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|gmcharlt@gmail.com |fridolyn.somers@biblibre.co | |m --- Comment #1 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 22956 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22956&action=edit Bug 11254 - breeding search must normalize ISBN See commit message -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11254 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11254 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|Small patch |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11254 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- This eyeballs well, but step-by-step instructions would really help. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11254 --- Comment #3 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- (In reply to M. Tompsett from comment #2)
This eyeballs well, but step-by-step instructions would really help. There is a test plan into patch comment :
Subject: [PATCH] Bug 11254 - breeding search must normalize ISBN When importing records, the ISBN is normalized and stored into database (see C4::Breeding::ImportBreeding). 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 breeding search. Also replaces call private method _isbn_cleanup by GetNormalizedISBN, the correct public method. Also allows the breeding search on ISBN with hyphens. Test plan : - Import a record with ISBN 13 with hyphens. ie 978-2-8153-0357-6 - Go to cataloguing : cataloguing/addbooks.pl - Enter ISBN 13 with hyphens. ie 978-2-8153-0357-6 => the imported record is found - Enter ISBN 13 without hyphens. ie 9782815303576 => the imported record is found - Enter normalized ISBN. ie 2815303574 => the imported record is found -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11254 --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 24443 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24443&action=edit MARC file of ISBN 978-0-12-345678-6 Sample data file that I used for testing. https://www.forewordreviews.com/reviews/the-little-book-of-string-theory/ -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11254 --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- I reset my data to several months ago, to make sure I didn't have the sample record I have attached. I did a staff client update. I imported the record, and added an item. I triggered a reindex: $ ./misc/migration_tools/rebuild_zebra.pl -b -a -z -v I went home, and clicked Cataloging to do a Cataloging Search. I searched for 9780691142890, and it didn't come up, except in the reservoir. I searched for 978-0-691-14289-0, and it came up in both the catalog and the reservoir. I went to the biblio record, and edited the record to not have hyphens in the ISBN (020$a). I triggered a reindex: $ ./misc/migration_tools/rebuild_zebra.pl -b -a -z -v I went home, and clicked Cataloging to do a Cataloging Search. I searched for 9780691142890, and it came up in both the catalog and the reservoir. I searched for 978-0-691-14289-0, and it didn't come up, except in the reservoir. Shouldn't it be coming up for both the reservoir and the catalog regardless of hypens? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11254 --- Comment #6 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- (In reply to M. Tompsett from comment #5)
Shouldn't it be coming up for both the reservoir and the catalog regardless of hypens? This behavior is enabled in catalog search by using UCI in Zebra indexation.
But this patch modifies a behavior only for breeding/reservoir search, which uses SQL query, not the search engine. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11254 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #22956|0 |1 is obsolete| | --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 24525 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24525&action=edit [SIGNED OFF] Bug 11254 - breeding search must normalize ISBN When importing records, the ISBN is normalized and stored into database (see C4::Breeding::ImportBreeding). 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 breeding search. Also replaces call private method _isbn_cleanup by GetNormalizedISBN, the correct public method. Also allows the breeding 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> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11254 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #8 from M. Tompsett <mtompset@hotmail.com> --- Vast improvement on reservoir searches by ISBN! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11254 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11254 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24525|0 |1 is obsolete| | --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 24527 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24527&action=edit Bug 11254 - breeding search must normalize ISBN When importing records, the ISBN is normalized and stored into database (see C4::Breeding::ImportBreeding). 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 breeding search. Also replaces call private method _isbn_cleanup by GetNormalizedISBN, the correct public method. Also allows the breeding 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> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11254 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #10 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Fridolin! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11254 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #11 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Pushed to 3.14.x, will be in 3.14.10 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11254 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Picked for 3.12.15! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org