Bug 8576 - Software error on authority edition when using merge
Summary: Software error on authority edition when using merge
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: 3.8
Hardware: All All
: P2 critical
Assignee: Fridolin Somers
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-06 12:59 UTC by Fridolin Somers
Modified: 2019-06-27 09:24 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Proposed patch (1.91 KB, patch)
2012-08-06 14:54 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 8576: Software error on authority edition when using merge (1.96 KB, patch)
2012-08-07 07:38 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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"