[Bug 9728] New: XISBN use simple search instead of SQL
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9728 Bug ID: 9728 Summary: XISBN use simple search instead of SQL Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Staff Client Assignee: koha-bugs@lists.koha-community.org Reporter: fridolyn.somers@biblibre.com CC: gmcharlt@gmail.com XISBN API uses normalized ISBN of a biblio to get a list of ISBNs, then searches via SQL in database for notices with those ISBNs. I noticed that if input ISBN has hyphens then returned ISBNs have hyphens else they don't have. So SQL query will not find if ISBNs have hyphens in database. Also, if biblio has several ISBN, only first one can be found with actual SQL query (isbn LIKE '$xisbn%'). So I propose to use a simple search "nb=$xisbn". This will find biblio from ISBN with or without hyphen. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9728 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |fridolyn.somers@biblibre.co |ity.org |m --- Comment #1 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 15763 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15763&action=edit Proposed patch See commit comment -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9728 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=9728 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- This appears to be working, but I'm not sure what it means in the test plan, "Perform a simple search on thoses ISBNs : nb:1234567890." The description of the problem describes issues with hyphens and multiple ISBNs. If the patch addresses those problems, how can I test those aspects of it? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9728 --- Comment #3 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> ---
Perform a simple search on thoses ISBNs : nb:1234567890 I mean perform a search on the previously found ISBNs. You can use the simple search field with a CCL query : "nb:1234567890" (replace 1234567890 with the ISBN) or the advanced search.
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9728 --- Comment #4 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- (In reply to comment #2)
The description of the problem describes issues with hyphens and multiple ISBNs. If the patch addresses those problems, how can I test those aspects of it?
To test this, edit a matched record : - Multiple ISBN : add an new ISBN field after and before matching ISBN field and retest - Hyphens : edit matched ISBN to remove or add hyphens and retest -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9728 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |paul.poulain@biblibre.com --- Comment #5 from Paul Poulain <paul.poulain@biblibre.com> --- Patch tested with a sandbox, by jmbroust <jean-manuel.broust@univ-lyon2.fr> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9728 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15763|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9728 --- Comment #6 from Paul Poulain <paul.poulain@biblibre.com> --- Created attachment 16633 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16633&action=edit Bug 9728: XISBN use simple search instead of SQL XISBN API uses normalized ISBN of a biblio to get a list of ISBNs, then searches via SQL in database for notices with those ISBNs. I noticed that if input ISBN has hyphens then returned ISBNs have hyphens else they don't have. So SQL query will not find if ISBNs have hyphens in database. Also, if biblio has several ISBN, only first one can be found with actual SQL query (isbn LIKE '$xisbn%'). This patch replaces SQL query by a simple search "nb=$xisbn". This will find biblio from ISBN with or without hyphen. Test plan : - Activate FRBRizeEditions and XISBN sysprefs - Go to a biblio witch has several editions - Note its normalized ISBN (you may look in amazon links) - Replace [ISBN] by biblio normalized ISBN in this URL : http://xisbn.worldcat.org/webservices/xid/isbn/[ISBN]?method=getEditions&format=xml&fl=form,year,lang,ed - Go to this URL and see which ISBNs are returned - Perform a simple search on thoses ISBNs : nb:1234567890 - Look at "Editions" tab => Check that diplayed biblios are the same you found by simple search Signed-off-by: jmbroust <jean-manuel.broust@univ-lyon2.fr> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9728 Chris Cormack <chris@bigballofwax.co.nz> 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=9728 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #16633|0 |1 is obsolete| | --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 18650 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18650&action=edit Bug 9728: XISBN use simple search instead of SQL XISBN API uses normalized ISBN of a biblio to get a list of ISBNs, then searches via SQL in database for notices with those ISBNs. I noticed that if input ISBN has hyphens then returned ISBNs have hyphens else they don't have. So SQL query will not find if ISBNs have hyphens in database. Also, if biblio has several ISBN, only first one can be found with actual SQL query (isbn LIKE '$xisbn%'). This patch replaces SQL query by a simple search "nb=$xisbn". This will find biblio from ISBN with or without hyphen. Test plan : - Activate FRBRizeEditions and XISBN sysprefs - Go to a biblio witch has several editions - Note its normalized ISBN (you may look in amazon links) - Replace [ISBN] by biblio normalized ISBN in this URL : http://xisbn.worldcat.org/webservices/xid/isbn/[ISBN]?method=getEditions&format=xml&fl=form,year,lang,ed - Go to this URL and see which ISBNs are returned - Perform a simple search on thoses ISBNs : nb:1234567890 - Look at "Editions" tab => Check that diplayed biblios are the same you found by simple search Signed-off-by: jmbroust <jean-manuel.broust@univ-lyon2.fr> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9728 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #8 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Fridolyn! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9728 --- Comment #9 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Seems to have broken Unit Test. I work on a followup to fix this. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9728 --- Comment #10 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 19122 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19122&action=edit Bug 9728: XISBN unit test update Follow-up to update XISBN unit tests. Since now XISBN uses search engin, I added a mock on C4::Search::SimpleSearch.pm. A test for ThingISBN connexion already existed, I added on XISBN connexion. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9728 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9728 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9728 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #11 from Galen Charlton <gmcharlt@gmail.com> --- (In reply to comment #9)
Seems to have broken Unit Test. I work on a followup to fix this.
Oops, I should have caught that. I've pushed the follow-up to master. Thanks, Fridolyn! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9728 Galen Charlton <gmcharlt@gmail.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=9728 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9728 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- The UT updates have been pushed to 3.12.x, will be in 3.12.9. Thanks Fridolin! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org