[Bug 32327] New: When replacing bib record via z39.50, only 1 ISBN should be searched and it should be normalized
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32327 Bug ID: 32327 Summary: When replacing bib record via z39.50, only 1 ISBN should be searched and it should be normalized Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: andrewfh@dubcolib.org QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl The replace via z39.50 function pre-populates the z39.50 search form with values from the existing bib. Koha just pastes in the contents of biblioitems.isbn, which means it very often pre-populates that field with a value that will never find anything. If the existing record has more than 1 ISBN, the prepopulated form will list them all, pipe-separated. This search will always return no results, even when either ISBN returns results successfully on its own. If the existing record contains a parenthetical note about binding, that search will generally fail as well. We should only put the first ISBN from the record into the search form and we should strip out any binding note or other fluff. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32327 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32327 --- Comment #1 from Lucas Gass <lucas@bywatersolutions.com> --- This jQuery ( intranetuserjs ) can be helpful to trim the ISBN field down to just a single valid ISBN: if ( $('#cat_z3950_search').length ) { let splitISBNfields = $('#isbn').val().split(/(\s+)/); let found; splitISBNfields.forEach( function(item) { if ( item.match(/^(?=(?:\D*\d){10}(?:(?:\D*\d){3})?$)[\d-]+$/) && !found ) { $('#isbn').val(item); found = 1; } }); $('#title').val(''); $('#author').val(''); } -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32327 Manos PETRIDIS <egpetridis@yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |egpetridis@yahoo.com --- Comment #2 from Manos PETRIDIS <egpetridis@yahoo.com> --- Or all ISBNs should be searched -each in normalised form- and the results be aggregated before reaching the results window. This would be more close to "search according to data already existing in the current entry". -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32327 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Manos PETRIDIS from comment #2)
Or all ISBNs should be searched -each in normalised form- and the results be aggregated before reaching the results window. This would be more close to "search according to data already existing in the current entry".
While this would be the ideal solution, I would require quite a bit more of work. The solution Andrew suggests would work well for an immediate fix to the bug and we could also easily backport to stable releases. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32327 Juliet Heltibridle <jheltibridle@rcplib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jheltibridle@rcplib.org --- Comment #4 from Juliet Heltibridle <jheltibridle@rcplib.org> --- I agree that it would be great to have the ability to search for all ISBNs, but I also agree that an immediate fix that just searches on the first ISBN would be great. I've implemented Lucas's jquery, which helps. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32327 --- Comment #5 from Manos PETRIDIS <egpetridis@yahoo.com> --- This "simplified" behavior, however, deprives us of the ability to simultaneously search for ISBNs with and without hyphens, ISBN-10 and ISBN-13, should all forms be registered in the biblio. An even better solution would be to compute all 4 forms (10/13/hyphenated/not), search with all 4, and display the aggregated list for the user to choose. As it seems to be outside the scope of this bug, I'll try and create a new one in the future, marked as enhancement. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org