The script serials-edit.pl is not checking for the existence of the
barcode field before checking for barcode subfield for autoBarcode =
incremental. If the barcode field doesn't exist, the script dies with
errors.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
Checked that adding items on serial receive still works.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
if ( C4::Context->preference('autoBarcode') eq
'incremental' )
{
- if ( !$bib_record->field($barcodetagfield)
- ->subfield($barcodetagsubfield) )
+ if (
+ !(
+ $bib_record->field($barcodetagfield)
+ && $bib_record->field($barcodetagfield)->subfield($barcodetagsubfield)
+ )
+ )
{
my $sth_barcode = $dbh->prepare(
'select max(abs(barcode)) from items');