Bug 8576

Summary: Software error on authority edition when using merge
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: CatalogingAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P2 CC: chris, m.de.rooy, mtj, paul.poulain
Version: 3.8   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Proposed patch
Bug 8576: Software error on authority edition when using merge

Description Fridolin Somers 2012-08-06 12:59:41 UTC
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.
Comment 1 Fridolin Somers 2012-08-06 14:38:02 UTC
To reproduce the bug, use a used authority, in order to perform the merge.
Comment 2 Fridolin Somers 2012-08-06 14:54:01 UTC Comment hidden (obsolete)
Comment 3 Chris Cormack 2012-08-07 07:38:30 UTC
Created attachment 11404 [details] [review]
Bug 8576: Software error on authority edition when using merge

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Comment 4 Mason James 2012-08-10 03:43:54 UTC
(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
Comment 5 Chris Cormack 2012-08-10 19:25:41 UTC
Pushed to 3.8.x will be in 3.8.4
Comment 6 Paul Poulain 2012-08-28 15:56:27 UTC
Patch pushed on master today, already pushed on stable, changing status to "pushed to stable"