[Koha-bugs] [Bug 23532] New: AutoCreateAuthorities create authority only headings

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Sep 3 12:56:19 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23532

            Bug ID: 23532
           Summary: AutoCreateAuthorities create authority only headings
 Change sponsored?: ---
           Product: Koha
           Version: 19.05
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Cataloging
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: gveranis at gmail.com
        QA Contact: testopia at bugs.koha-community.org
                CC: m.de.rooy at rijksmuseum.nl

The problem: 
We have enable AutoCreateAuthorities and also enable BiblioAddsAuthorities
and when we insert values for tag 650 , we get authorities only with 150$a
filled and not other subfields. 

I found that on C4/Biblio.pm lines 549 - 555

 map {
                        $authfield->add_subfields( $_->[0] => $_->[1] )
                          if ( $_->[0] =~ /[A-z]/ && $_->[0] ne "a"
                            && C4::Heading::valid_bib_heading_subfield(
                                $authority_type->auth_tag_to_report, $_->[0] )
                            );
                    } $field->subfields();

Koha try to copy subfields to the new authority record. 
BUT the condition  

C4::Heading::valid_bib_heading_subfield(
                                $authority_type->auth_tag_to_report, $_->[0])

return false. Because the  $authority_type->auth_tag_to_report has value of 150
and not 650 as file C4/Heading/MARC21.pm declared. 

if we set on file C4/Heading/MARC21.pm also the value 
 '150' => { auth_type => 'TOPIC_TERM', subfields => 'abvxyz', subject => 1 },

(valid based on
https://github.com/Koha-Community/Koha/blob/master/installer/data/mysql/en/marcflavour/marc21/mandatory/authorities_normal_marc21.sql)

then it works , but I am not sure if it is valid to set there new fields. 

or better solution could be $authority_type->auth_tag_to_report take right
value in condition.

Could anyone propose the best solution ? 

Thanks, 
George Veranis

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list