Summary: | t/db_dependent/Koha/Plugins/authority_hooks.t fails with Elasticsearch | ||
---|---|---|---|
Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
Component: | Test Suite | Assignee: | Marcel de Rooy <m.de.rooy> |
Status: | CLOSED FIXED | QA Contact: | Katrin Fischer <katrin.fischer> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35536 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.05.00
|
|
Circulation function: | |||
Attachments: |
Bug 36397: Quick fix for Koha/Plugins/authority_hooks.t
Bug 36397: Quick fix for Koha/Plugins/authority_hooks.t |
Description
Marcel de Rooy
2024-03-22 09:44:08 UTC
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; Created attachment 163668 [details] [review] Bug 36397: Quick fix for Koha/Plugins/authority_hooks.t Lazy approach for now: just ignore the other warnings that are logical when passing blank records to SearchEngine. Elastic is a bit more sensitive than Zebra here.. Test plan: Run t/db_dependent/Koha/Plugins/authority_hooks.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 163672 [details] [review] Bug 36397: Quick fix for Koha/Plugins/authority_hooks.t Lazy approach for now: just ignore the other warnings that are logical when passing blank records to SearchEngine. Elastic is a bit more sensitive than Zebra here.. Test plan: Run t/db_dependent/Koha/Plugins/authority_hooks.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Pushed for 24.05! Well done everyone, thank you! |