When using the update of biblios on authorities edition (managed by 'dontmerge' syspref), and when biblionumber is on a control field (< 10) : When editing or creating an authority, you get a software error : "Software error: Control fields (generally, just tags below 010) do not have subfields, use data() at /usr/share/perl5/MARC/Record.pm line 239 For help, ..." This comes from the fact that, to find biblionumber in a record, one must check if biblio.biblionumber is mapped on a control field to call "$record->field($tagfield)->data" instead if "$record->subfield($tagfield,$tagsubfield)". It was also missing in batchImportMARCWithBiblionumbers.pl.
To reproduce the bug, use a used authority, in order to perform the merge.
Created attachment 11387 [details] [review] Proposed patch
Created attachment 11404 [details] [review] Bug 8576: Software error on authority edition when using merge Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
(In reply to comment #3) > Created attachment 11404 [details] [review] > Bug 8576: Software error on authority edition when using merge > > Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> looks good, passing QA on this mason@xen1:~/git/head$ koha-qa.pl - 7a6718d Bug 8576: Software error on authority edition when using merge C4/AuthoritiesMarc.pm misc/batchImportMARCWithBiblionumbers.pl - perlcritic-progressive tests... OK - perl -c syntax tests... OK - xt/tt_valid.t tests... OK - xt/author/vaild-template.t tests... OK
Pushed to 3.8.x will be in 3.8.4
Patch pushed on master today, already pushed on stable, changing status to "pushed to stable"