Bugzilla – Attachment 135266 Details for
Bug 30738
Forked CGI MARC import warnings are not logged
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30738: Log warnings for background MARC import
Bug-30738-Log-warnings-for-background-MARC-import.patch (text/plain), 1.69 KB, created by
Nick Clemens
on 2022-05-23 13:50:13 UTC
(
hide
)
Description:
Bug 30738: Log warnings for background MARC import
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2022-05-23 13:50:13 UTC
Size:
1.69 KB
patch
obsolete
>From c437c883585467302e3b9ef3ad42c06b5df98416 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Thu, 12 May 2022 04:09:58 +0000 >Subject: [PATCH] Bug 30738: Log warnings for background MARC import > >This change logs warnings from the CGI background MARC import. > >Test plan: >0) Apply patch >1) Export a record with an item >2) Update the 952$f subfield to "Circulation" (any value over 10 chars) >3) Import the record and try to add the item >4) The import will stay stuck with "Importing" status and 0% job >progress >5) Check the /var/log/koha/kohadev/intranet-error.log file >and notice there's an error with the following text: >"Data too long for column 'coded_location_qualifier' at row 1" > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > tools/manage-marc-import.pl | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/tools/manage-marc-import.pl b/tools/manage-marc-import.pl >index 87aae2afd9..e84178fe42 100755 >--- a/tools/manage-marc-import.pl >+++ b/tools/manage-marc-import.pl >@@ -35,6 +35,8 @@ use C4::BackgroundJob; > use C4::Labels::Batch; > use Koha::BiblioFrameworks; > >+use Koha::Logger; >+ > my $script_name = "/cgi-bin/koha/tools/manage-marc-import.pl"; > > my $input = CGI->new; >@@ -330,6 +332,11 @@ sub put_in_background { > # we're now running in the background > close STDOUT; > close STDERR; >+ $SIG{__WARN__} = sub { >+ my ($msg) = @_; >+ my $logger = Koha::Logger->get; >+ $logger->warn($msg); >+ } > } else { > # fork failed, so exit immediately > warn "fork failed while attempting to run tools/manage-marc-import.pl as a background job"; >-- >2.30.2
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 30738
:
134911
|
134941
| 135266