Bug 41036: Log errors in Koha::ImportBatch->new_from_file

To test:
1. prove t/db_dependent/Koha/ImportBatch.t
2. Observe success

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Lari Taskula 2025-10-16 20:16:58 +03:00 committed by Lucas Gass
parent bcf4531288
commit f54cce344c
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
2 changed files with 7 additions and 0 deletions

View File

@ -102,6 +102,13 @@ sub new_from_file {
);
}
if ($errors) {
Koha::Logger->get->warn( 'The following error(s) occurred during '
. ( defined $format ? ( $format . " " ) : "" )
. "record import:\nERROR: "
. join( "\nERROR: ", @$errors ) );
}
$job->size( scalar @$marcrecords )->store if $job;
( $batch_id, $num_valid, $num_items, @import_errors ) = BatchStageMarcRecords(

0
t/db_dependent/Koha/ImportBatch.t Normal file → Executable file
View File