From ca6ef8ddaf732587ad4293b7d5bd2122b7ca685c Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 18 Oct 2021 16:14:07 +0100 Subject: [PATCH] Bug 11175: (QA follow-up) Be more specific with title fields We were using the MARC::Record title accessor, but that just stringifies all the subfields of field 245. The indexer, and the XSLT, specifically use 245a so we need to do the same. Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart --- Koha/Biblio.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index 5026ec7783..49707db06c 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -543,7 +543,7 @@ sub get_components_query { } } else { - my $cleaned_title = $marc->title; + my $cleaned_title = $marc->subfield('245', "a"); $cleaned_title =~ tr|/||; $cleaned_title = $builder->clean_search_term($cleaned_title); $searchstr = "Host-item:($cleaned_title)"; -- 2.39.5