View | Details | Raw Unified | Return to bug 11254
Collapse All | Expand All

(-)a/C4/Breeding.pm (-1 / +4 lines)
Lines 110-116 sub ImportBreeding { Link Here
110
            # if isbn found and biblio does not exist, add it. If isbn found and biblio exists, 
110
            # if isbn found and biblio does not exist, add it. If isbn found and biblio exists, 
111
            # overwrite or ignore depending on user choice
111
            # overwrite or ignore depending on user choice
112
            # drop every "special" char : spaces, - ...
112
            # drop every "special" char : spaces, - ...
113
            $oldbiblio->{isbn} = C4::Koha::_isbn_cleanup($oldbiblio->{isbn}); # FIXME C4::Koha::_isbn_cleanup should be public
113
            $oldbiblio->{isbn} = C4::Koha::GetNormalizedISBN($oldbiblio->{isbn});
114
            # search if biblio exists
114
            # search if biblio exists
115
            my $biblioitemnumber;
115
            my $biblioitemnumber;
116
            if ($oldbiblio->{isbn}) {
116
            if ($oldbiblio->{isbn}) {
Lines 175-180 sub BreedingSearch { Link Here
175
    my $sth;
175
    my $sth;
176
    my @results;
176
    my @results;
177
177
178
    # normalise ISBN like at import
179
    $isbn = C4::Koha::GetNormalizedISBN($isbn);
180
178
    $query = "SELECT import_record_id, file_name, isbn, title, author
181
    $query = "SELECT import_record_id, file_name, isbn, title, author
179
              FROM  import_biblios 
182
              FROM  import_biblios 
180
              JOIN import_records USING (import_record_id)
183
              JOIN import_records USING (import_record_id)
(-)a/C4/ImportBatch.pm (-1 / +1 lines)
Lines 1437-1443 sub _add_biblio_fields { Link Here
1437
    my ($title, $author, $isbn, $issn) = _parse_biblio_fields($marc_record);
1437
    my ($title, $author, $isbn, $issn) = _parse_biblio_fields($marc_record);
1438
    my $dbh = C4::Context->dbh;
1438
    my $dbh = C4::Context->dbh;
1439
    # FIXME no controlnumber, originalsource
1439
    # FIXME no controlnumber, originalsource
1440
    $isbn = C4::Koha::_isbn_cleanup($isbn); # FIXME C4::Koha::_isbn_cleanup should be made public
1440
    $isbn = C4::Koha::GetNormalizedISBN($isbn);
1441
    my $sth = $dbh->prepare("INSERT INTO import_biblios (import_record_id, title, author, isbn, issn) VALUES (?, ?, ?, ?, ?)");
1441
    my $sth = $dbh->prepare("INSERT INTO import_biblios (import_record_id, title, author, isbn, issn) VALUES (?, ?, ?, ?, ?)");
1442
    $sth->execute($import_record_id, $title, $author, $isbn, $issn);
1442
    $sth->execute($import_record_id, $title, $author, $isbn, $issn);
1443
    $sth->finish();
1443
    $sth->finish();
(-)a/cataloguing/addbooks.pl (-2 / +3 lines)
Lines 116-122 if ($query) { Link Here
116
#check is on isbn legnth 13 for new isbn and 10 for old isbn
116
#check is on isbn legnth 13 for new isbn and 10 for old isbn
117
    my ( $title, $isbn );
117
    my ( $title, $isbn );
118
    if ($query=~/\d/) {
118
    if ($query=~/\d/) {
119
        my $querylength = length $query;
119
        my $clean_query = $query;
120
        $clean_query =~ s/-//g; # remove hyphens
121
        my $querylength = length $clean_query;
120
        if ( $querylength == 13 || $querylength == 10 ) {
122
        if ( $querylength == 13 || $querylength == 10 ) {
121
            $isbn = $query;
123
            $isbn = $query;
122
        }
124
        }
123
- 

Return to bug 11254