Bug 41147

Summary: Counts in bulkmarcimport.pl are incorrect
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: Command-line UtilitiesAssignee: Nick Clemens (kidclamp) <nick>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: robin
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- 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

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