From 56c1b7da4801126c03c199a486b44314ed6e9d01 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. --- Koha/Biblio.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index d3d7a9badd..b597f87ff8 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -1098,7 +1098,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.20.1