From 1fbdebca0e21aff5e624a143e94d6ba20f0e449d Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 5 Jan 2021 00:21:16 +0000 Subject: [PATCH] Bug 11158: Add complete field to authority "starts with" search This patch adds "complete field" to the authority "starts with" search so that it uses the untokenized "p" register. Test plan: 1. Apply the patch 2. koha-plack --restart kohadev 3. Go to http://localhost:8081/cgi-bin/koha/authorities/authorities-home.pl 4. Type in "Espen" into the search box and hit "Submit" 5. Note that there are 3 results 6. Change "contains" to "starts with" and hit "Submit" 7. Note that no results are returned 8. Change the search from "Espen" to "Sandberg" and hit "Submit" 9. Note that 3 results are returned 10. Experiment to your heart's content and rejoice at your new found power Signed-off-by: David Nind Signed-off-by: Martin Renvoize --- C4/AuthoritiesMarc.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index d6f2e381b3..ef90a41cf0 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -183,8 +183,8 @@ sub SearchAuthorities { $attr .= " \@attr 4=107 "; #Number Exact match } elsif ( $operator and $operator eq "start" ) { - $attr .= " \@attr 3=2 \@attr 4=1 \@attr 5=1 " - ; #Firstinfield Phrase, Right truncated + $attr .= " \@attr 3=2 \@attr 4=1 \@attr 5=1 \@attr 6=3 " + ; #Firstinfield Phrase, Right truncated, Complete field } elsif ( $operator and $operator eq "exact" ) { $attr .= " \@attr 4=1 \@attr 5=100 \@attr 6=3 " -- 2.20.1