Bug 17816

Summary: Useless call to GetBibioData in bulkmarcimport.pl(?)
Product: Koha Reporter: David Gustafsson <glasklas>
Component: Command-line UtilitiesAssignee: Galen Charlton <gmcharlt>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: robin
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Crowdfunding committed: 0
Crowdfunding contact: Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description David Gustafsson 2016-12-27 12:46:28 UTC
This call to GetBibioData seems without purpose: https://github.com/Koha-Community/Koha/blob/2fe2ef41bd8bf2f142597e39f493edbdbf75c8a3/misc/migration_tools/bulkmarcimport.pl#L418

$biblioitemnumber is either overwritten on the lines below, or update/create failed/was skipped and the later AddItemBatchFromMarc will fail anyways.
Comment 1 David Gustafsson 2016-12-27 12:51:42 UTC
Ok, seems like ModBiblio returns 1(!), not id and itemid. So the lvalues for ModBibilio must be removed. I think I saw another bug-report on this somewhere. Think this takes some more effort to fix, AddItemBatchFromMarc should only be run on insert, so the line can still be removed. But some further refactoring is also needed.