Bugzilla – Attachment 194695 Details for
Bug 41147
Counts in bulkmarcimport.pl are incorrect
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41147: (follow-up) Fix wrong record count
Bug-41147-follow-up-Fix-wrong-record-count.patch (text/plain), 1.16 KB, created by
Jan Kissig
on 2026-03-06 12:23:06 UTC
(
hide
)
Description:
Bug 41147: (follow-up) Fix wrong record count
Filename:
MIME Type:
Creator:
Jan Kissig
Created:
2026-03-06 12:23:06 UTC
Size:
1.16 KB
patch
obsolete
>From bb626512f91f0eed42597f27c740d8cd54d6428b Mon Sep 17 00:00:00 2001 >From: Jan Kissig <bibliothek@th-wildau.de> >Date: Fri, 6 Mar 2026 12:12:41 +0000 >Subject: [PATCH] Bug 41147: (follow-up) Fix wrong record count > >Record_number gets increased every cycle before batch->next is called even when batch->next returns undef. >This fix decreases record_number by 1 to ignore that last cycle in order to display the right number of records processed. >--- > misc/migration_tools/bulkmarcimport.pl | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl >index ea31c0b0b16..baa427cba70 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -721,6 +721,8 @@ RECORD: while () { > print $record->as_formatted() . "\n" if ( $verbose // 0 ) == 2; > } else { > $records_exhausted = 1; >+ $record_number >+ --; # record_number was incremented even though $batch->next was empty, so it must be decremented by 1 > } > > if ( !$test_parameter && $record_number % $commitnum == 0 || $record_number == $number || $records_exhausted ) { >-- >2.39.5
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 41147
:
188705
|
194694
| 194695