Bug 6387

Summary: remove_items_from_biblioitems.pl doesn't handle errors
Product: Koha Reporter: Jared Camins-Esakov <jcamins>
Component: Installation and upgrade (command-line installer)Assignee: Galen Charlton <gmcharlt>
Status: CLOSED INVALID QA Contact: Bugs List <koha-bugs>
Severity: enhancement    
Priority: P5 - low CC: koha.sekjal
Version: 3.6   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Jared Camins-Esakov 2011-05-22 20:23:56 UTC
The script remove_items_from_biblioitems.pl needed for upgrading from Koha 3.2 to 3.4 doesn't handle errors properly, and when there's a badly corrupted record, it prints the following message and dies:
Undefined subroutine &MARC::Record::carp called at /usr/share/perl5/MARC/Record.pm line 565.

At the very least, remove_items_from_biblioitems.pl should print a useful error message, and ideally it should handle the error, rather than dying mid-way through.
Comment 1 Ian Walls 2011-05-24 17:38:18 UTC
This looks like an issue with MARC::Record, not necessarily remove_items_from_biblioitems.pl.  I see this line in MARC::Record 2.0.2 and possible 2.0.3

remove_items_from_biblioitems.pl has an error handling method built in to report any biblionumber that fails to parse, but it looks like this undefined subroutine error is preventing the code from reaching that point of error reporting.
Comment 2 Jared Camins-Esakov 2012-01-06 20:55:08 UTC
Marking this bug invalid based on Ian's comment.