[Koha-bugs] [Bug 36397] Koha/Plugins/authority_hooks.t seems to fail with Elastic

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 22 10:45:28 CET 2024


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

--- Comment #1 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Failing test
    warning_like { ( $id ) = C4::AuthoritiesMarc::AddAuthority(
MARC::Record->new, undef, 'PERSO_NAME' ); }
            qr/after_authority_action called with action: create, id: \d+/,
            'AddAuthority calls the hook with action=create, id passed';

It triggers another warning about no authtype when using Elastic:

Crashes on this part in marc_records_to_documents
            my $authtypecode = GuessAuthTypeCode( $record );
            if( $authtypecode ){
                if( $authtypecode !~ m/_SUBD/ ){ #Subdivision records will not
be used for linking and so don't require match-heading to be built
                    my $field = $record->field( $auth_match_headings{
$authtypecode } );
                    my $heading = C4::Heading->new_from_field( $field, undef, 1
); #new auth heading
                    push @{$record_document->{'match-heading'}},
$heading->search_form if $heading;
                }
            } else {
                warn "Cannot determine authority type for record: " .
$record->field('001')->as_string;

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


More information about the Koha-bugs mailing list