Bugzilla – Attachment 188021 Details for
Bug 41036
Koha::ImportBatch is not logging errors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41036: Log errors in Koha::ImportBatch->new_from_file
Bug-41036-Log-errors-in-KohaImportBatch-newfromfil.patch (text/plain), 1.24 KB, created by
Lari Taskula
on 2025-10-16 17:19:46 UTC
(
hide
)
Description:
Bug 41036: Log errors in Koha::ImportBatch->new_from_file
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2025-10-16 17:19:46 UTC
Size:
1.24 KB
patch
obsolete
>From 9fc9dd9e54cd1f0f9fb0b806ac5de02695466678 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@hypernova.fi> >Date: Thu, 16 Oct 2025 20:16:58 +0300 >Subject: [PATCH] Bug 41036: Log errors in Koha::ImportBatch->new_from_file > >To test: >1. prove t/db_dependent/Koha/ImportBatch.t >2. Observe success >--- > Koha/ImportBatch.pm | 7 +++++++ > t/db_dependent/Koha/ImportBatch.t | 0 > 2 files changed, 7 insertions(+) > mode change 100644 => 100755 t/db_dependent/Koha/ImportBatch.t > >diff --git a/Koha/ImportBatch.pm b/Koha/ImportBatch.pm >index 1d88fc68d16..eb1037d8afc 100644 >--- a/Koha/ImportBatch.pm >+++ b/Koha/ImportBatch.pm >@@ -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( >diff --git a/t/db_dependent/Koha/ImportBatch.t b/t/db_dependent/Koha/ImportBatch.t >old mode 100644 >new mode 100755 >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41036
:
188020
| 188021