Bugzilla – Attachment 114829 Details for
Bug 11158
Authorities 'starts with' search returns the same as 'contains' when using ICU
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11158: Add complete field to authority "starts with" search
Bug-11158-Add-complete-field-to-authority-starts-w.patch (text/plain), 1.66 KB, created by
David Cook
on 2021-01-05 00:26:21 UTC
(
hide
)
Description:
Bug 11158: Add complete field to authority "starts with" search
Filename:
MIME Type:
Creator:
David Cook
Created:
2021-01-05 00:26:21 UTC
Size:
1.66 KB
patch
obsolete
>From f5d5f4fb42a68c258236fe01ee89e7d2037a979f Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >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 >--- > C4/AuthoritiesMarc.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index b20293b56a..a5991a447b 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -178,8 +178,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.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11158
:
22517
|
114829
|
137049
|
137699