From 80a775d5f9d2ac4160a5aca80471694516444ca7 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 Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- Koha/Biblio.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index bd3559b9e7..fea1f21641 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -1722,7 +1722,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