Bugzilla – Attachment 137699 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.77 KB, created by
Martin Renvoize (ashimema)
on 2022-07-14 09:31:08 UTC
(
hide
)
Description:
Bug 11158: Add complete field to authority "starts with" search
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-07-14 09:31:08 UTC
Size:
1.77 KB
patch
obsolete
>From 1fbdebca0e21aff5e624a143e94d6ba20f0e449d 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 > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > 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
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