[Koha-bugs] [Bug 9500] New: GetNormalizedISBN only ever checks the first populated ISBN field

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jan 28 14:16:00 CET 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9500

            Bug ID: 9500
           Summary: GetNormalizedISBN only ever checks the first populated
                    ISBN field
    Classification: Unclassified
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: gmcharlt at gmail.com
          Reporter: kyle at bywatersolutions.com

If you take a look at C4::Koha::GetNormalizedISBN you will see code like this:

    if ($marcflavour eq 'UNIMARC') {
        @fields = $record->field('010');
        foreach my $field (@fields) {
            my $isbn = $field->subfield('a');
            if ($isbn) {
                return _isbn_cleanup($isbn);
            } else {
                return undef;
            }
        }
    }

If I read this correctly, if we have say two ISBNs in a record, with the first
being invalid and the second being valid, GetNormalizedISBN will still return
undef because it never bothers to check the second isbn!

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list