Bug 41147 - Counts in bulkmarcimport.pl are incorrect
Summary: Counts in bulkmarcimport.pl are incorrect
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Nick Clemens (kidclamp)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-30 18:18 UTC by Nick Clemens (kidclamp)
Modified: 2025-12-20 09:08 UTC (History)
2 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41147: Don't double count records (1.40 KB, patch)
2025-10-30 18:24 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2025-10-30 18:18:52 UTC
We are incrementing the record_number counter twice for every record
Comment 1 Nick Clemens (kidclamp) 2025-10-30 18:24:09 UTC
Created attachment 188705 [details] [review]
Bug 41147: Don't double count records

This patch prevents double counting records as we process them

To test:
1 - Export a single record from Koha in marcxml format
2 - perl misc/migration_tools/bulkmarcimport.pl -b -v -m MARCXML --file record.marcxml
3 - Note it says "3 MARC records processed"
4 - Apply patch
5 - Repeat
6 - 1 record processed
Comment 2 Roman Dolny 2025-12-20 09:08:11 UTC
Can confirm, that count of records processed after applying a patch is not doubled. But there is still +1 in count...

I tried with 1/2/4 records in file and get "2/3/5 MARC records done".