Bugzilla – Attachment 72619 Details for
Bug 11936
Consistent log message for item insert
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11936 - Consistent log message for item insert
Bug-11936---Consistent-log-message-for-item-insert.patch (text/plain), 2.22 KB, created by
Maksim Sen
on 2018-03-09 19:47:28 UTC
(
hide
)
Description:
Bug 11936 - Consistent log message for item insert
Filename:
MIME Type:
Creator:
Maksim Sen
Created:
2018-03-09 19:47:28 UTC
Size:
2.22 KB
patch
obsolete
>From 43038a5901941f73bf0e2f3fd1ad170c2bcb4d8d Mon Sep 17 00:00:00 2001 >From: Magnus Enger <magnus@libriotech.no> >Date: Thu, 22 Feb 2018 10:37:08 +0100 >Subject: [PATCH] Bug 11936 - Consistent log message for item insert > >If you use bulkmarcimport.pl to import records with items it looks >like the successfull insert of the record is reported multiple time, >but the second and subsequent "ok" is really related to importing >the item(s). > >This patch changes the log message on successfully inserting an item >to match the log message given when inserting an item fails. > >To test, the easy way: >- Look at lines 530 and 536 of bulkmarcimport.pl, and note that the > "op" in those two lines are different >- Apply the patch >- Look at lines 530 and 536 again, and note that the "op" is now > identical, and that this makes sense, since they are both related > to the same operation, specifically inserting an item > >To test, the hard way >- Have some records with items >- Import the records with bulkmarcimport.pl, and make sure to specify > the -l option, to create a log of the actions taken >- Look at the log and verify it looks something like this: > id;operation;status > 1;insert;ok > 1;insert;ok > 2;insert;ok > 2;insert;ok >- Apply this patch and import some more records with items. The log > should now be similar to this: > id;operation;status > 1;insert;ok > 1;insertitem;ok > 2;insert;ok > 2;insertitem;ok > >Signed-off-by: Maksim Sen <maksim.sen@inlibro.com> >--- > misc/migration_tools/bulkmarcimport.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl >index 9a3b44c..85cec5c 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -533,7 +533,7 @@ RECORD: while ( ) { > ModBiblioMarc( $record, $biblionumber, $framework ); > next RECORD; > } else { >- printlog({id=>$id||$originalid||$biblionumber, op=>"insert",status=>"ok"}) if ($logfile); >+ printlog({id=>$id||$originalid||$biblionumber, op=>"insertitem",status=>"ok"}) if ($logfile); > } > push @$errors_ref, @{ $more_errors }; > } >-- >2.7.4
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 11936
:
72066
|
72619
|
72641
|
72642