[Koha-bugs] [Bug 32327] When replacing bib record via z39.50, only 1 ISBN should be searched and it should be normalized

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Dec 8 21:45:14 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32327

--- Comment #1 from Lucas Gass <lucas at 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.


More information about the Koha-bugs mailing list