From 6a814b8d7830f81dc6b619da0c2980749c03519a Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 18 Oct 2021 18:06:32 +0100 Subject: [PATCH] Bug 26314: (follow-up) Make title search explicit This patch updates the get_volumes_query search returned when UseControlNumber is disabled such that it matches the query produced by XSLT sheets by replacing the ->title accessor with the more specific ->subfield('245', "a") accessor to just take subfield `a` into account. Signed-off-by: Michaela Sieber --- Koha/Biblio.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index b49ec0c432..55cee02a50 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -1679,7 +1679,7 @@ sub get_volumes_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 = "ti,phr:($cleaned_title)"; -- 2.30.2