Lines 76-84
sub process {
Link Here
|
76 |
}; |
76 |
}; |
77 |
|
77 |
|
78 |
try { |
78 |
try { |
79 |
my $column_headers = $args->{column_headers}; |
79 |
my $column_headers = $args->{column_headers}; |
80 |
my $rows = $args->{rows}; |
80 |
my $rows = $args->{rows}; |
81 |
my $package_id = $args->{package_id}; |
81 |
my $package_id = $args->{package_id}; |
|
|
82 |
my $create_linked_biblio = $args->{create_linked_biblio}; |
82 |
|
83 |
|
83 |
if ( scalar( @{$rows} ) == 0 ) { |
84 |
if ( scalar( @{$rows} ) == 0 ) { |
84 |
push @messages, { |
85 |
push @messages, { |
Lines 118-124
sub process {
Link Here
|
118 |
}; |
119 |
}; |
119 |
$failed_imports++; |
120 |
$failed_imports++; |
120 |
} else { |
121 |
} else { |
121 |
my $imported_title = Koha::ERM::EHoldings::Title->new($formatted_title)->store; |
122 |
my $imported_title = Koha::ERM::EHoldings::Title->new($formatted_title) |
|
|
123 |
->store( { create_linked_biblio => $create_linked_biblio } ); |
122 |
create_linked_resource( |
124 |
create_linked_resource( |
123 |
{ |
125 |
{ |
124 |
title => $imported_title, |
126 |
title => $imported_title, |
Lines 216-222
sub read_file {
Link Here
|
216 |
|
218 |
|
217 |
my $file_content = defined( $file->{file_content} ) ? decode_base64( $file->{file_content} ) : ""; |
219 |
my $file_content = defined( $file->{file_content} ) ? decode_base64( $file->{file_content} ) : ""; |
218 |
my $delimiter = $file->{filename} =~ /\.tsv$/ ? "\t" : ","; |
220 |
my $delimiter = $file->{filename} =~ /\.tsv$/ ? "\t" : ","; |
219 |
my $quote_char = $file->{filename} =~ /\.tsv$/ ? "" : '"'; |
221 |
my $quote_char = $file->{filename} =~ /\.tsv$/ ? "\"" : "\""; |
220 |
|
222 |
|
221 |
open my $fh, "<", \$file_content or die; |
223 |
open my $fh, "<", \$file_content or die; |
222 |
my $csv = Text::CSV_XS->new( |
224 |
my $csv = Text::CSV_XS->new( |
Lines 422-431
sub is_file_too_large {
Link Here
|
422 |
}; |
424 |
}; |
423 |
} |
425 |
} |
424 |
|
426 |
|
425 |
=head3 |
427 |
=head3 rescue_EBSCO_files |
426 |
|
428 |
|
427 |
EBSCO have an incorrect spelling of "preceding_publication_title_id" in all of their KBART files ("preceeding" instead of "preceding"). |
429 |
EBSCO have an incorrect spelling of "preceding_publication_title_id" in all of their KBART files ("preceeding" instead of "preceding"). |
428 |
This is very annoying because it means all of their KBART files fail to import using the current methodology. |
430 |
This means all of their KBART files fail to import using the current methodology. |
429 |
There is no simple way of finding out who the vendor is before importing so all KBART files from any vendor are going to have to be checked for this spelling and corrected. |
431 |
There is no simple way of finding out who the vendor is before importing so all KBART files from any vendor are going to have to be checked for this spelling and corrected. |
430 |
|
432 |
|
431 |
=cut |
433 |
=cut |