Bugzilla – Attachment 118255 Details for
Bug 26533
Searching authorities using 'is exactly' doesn't work as expected
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26533: Fix 'is exactly' search for authorities
Bug-26533-Fix-is-exactly-search-for-authorities.patch (text/plain), 9.23 KB, created by
Aleisha Amohia
on 2021-03-15 20:37:36 UTC
(
hide
)
Description:
Bug 26533: Fix 'is exactly' search for authorities
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2021-03-15 20:37:36 UTC
Size:
9.23 KB
patch
obsolete
>From 738feb1cde0bb8981122ce3deb879e66e15cf178 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 10 Mar 2021 10:33:16 +1300 >Subject: [PATCH] Bug 26533: Fix 'is exactly' search for authorities > >The exact search 6=3 is implemented, but it isn't used as expected when >you select 'is exactly' from the authorities search dropdown. This patch >remedies that. > >To test: >1) Ensure you have an authority with more than one word in the name, > i.e. Electric power production >2) Go to Authorities in the staff client. >3) Change the dropdown to 'is exactly' and search for one of the words >in your record's title, i.e. 'power' in the 'main heading' search >4) Confirm your authority shows in the results, even though it is not an >exact match. >5) Search for a biblio record and go to edit the record. >6) Go to Tab 6 and click the plugin button next to one of the 6xx$a >fields to trigger the authority finder plugin >7) Repeat Step 3 and Step 4 >8) Go to the OPAC and go to Authority Search >9) Repeat Step 3 and Step 4 > >Apply patch > >10) Repeat Steps 1 to 9, confirm that this time the record does NOT show >in search results. >11) Repeat Steps 1 to 9 but this time search for the authority record's >full title, i.e. 'Electric power production'. Confirm the record does >show in the search results because the search term now matches title exactly. > >Sponsored-by: Education Services Australia SCIS >--- > .../prog/en/includes/auth-finder-search.inc | 24 ++++++++++---------- > .../prog/en/includes/authorities-search.inc | 26 +++++++++++----------- > .../bootstrap/en/modules/opac-authorities-home.tt | 2 +- > 3 files changed, 26 insertions(+), 26 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc >index 449a0783aa..9453e3f40b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc >@@ -31,10 +31,10 @@ > [% ELSE %] > <option value="start">starts with</option> > [% END %] >- [% IF ( operator_mainstr == 'is' ) %] >- <option value="is" selected="selected">is exactly</option> >+ [% IF ( operator_mainstr == 'exact' ) %] >+ <option value="exact" selected="selected">is exactly</option> > [% ELSE %] >- <option value="is">is exactly</option> >+ <option value="exact">is exactly</option> > [% END %] > </select> > <input id="value_mainstr" style="width:400px;" type="text" name="value_mainstr" value="[% value_mainstr | html %]" /> >@@ -57,10 +57,10 @@ > [% ELSE %] > <option value="start">starts with</option> > [% END %] >- [% IF ( operator_main == 'is' ) %] >- <option value="is" selected="selected">is exactly</option> >+ [% IF ( operator_main == 'exact' ) %] >+ <option value="exact" selected="selected">is exactly</option> > [% ELSE %] >- <option value="is">is exactly</option> >+ <option value="exact">is exactly</option> > [% END %] > </select> > <input id="value_main" style="width:400px;" type="text" name="value_main" value="[% value_main | html %]" /> >@@ -82,10 +82,10 @@ > [% ELSE %] > <option value="start">starts with</option> > [% END %] >- [% IF ( operator_match == 'is' ) %] >- <option value="is" selected="selected">is exactly</option> >+ [% IF ( operator_match == 'exact' ) %] >+ <option value="exact" selected="selected">is exactly</option> > [% ELSE %] >- <option value="is">is exactly</option> >+ <option value="exact">is exactly</option> > [% END %] > </select> > <input type="text" name="value_match" value="[% value_match | html %]" /> >@@ -106,10 +106,10 @@ > [% ELSE %] > <option value="start">starts with</option> > [% END %] >- [% IF ( operator_any == 'is' ) %] >- <option value="is" selected="selected">is exactly</option> >+ [% IF ( operator_any == 'exact' ) %] >+ <option value="exact" selected="selected">is exactly</option> > [% ELSE %] >- <option value="is">is exactly</option> >+ <option value="exact">is exactly</option> > [% END %] > </select> > <input id="value_any" style="width:400px;" type="text" name="value_any" value="[% value_any | html %]" /> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc >index 13474f87c1..3ee3f4f8ef 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc >@@ -31,10 +31,10 @@ > [% ELSE %] > <option value="start">starts with</option> > [% END %] >- [% IF ( operator == 'is' ) %] >- <option value="is" selected="selected">is exactly</option> >+ [% IF ( operator == 'exact' ) %] >+ <option value="exact" selected="selected">is exactly</option> > [% ELSE %] >- <option value="is">is exactly</option> >+ <option value="exact">is exactly</option> > [% END %] > </select> > <input id="value_mainentry" type="text" name="value" value="[% value | html %]" class="head-searchbox" /> >@@ -87,10 +87,10 @@ > [% ELSE %] > <option value="start">starts with</option> > [% END %] >- [% IF ( operator == 'is' ) %] >- <option value="is" selected="selected">is exactly</option> >+ [% IF ( operator == 'exact' ) %] >+ <option value="exact" selected="selected">is exactly</option> > [% ELSE %] >- <option value="is">is exactly</option> >+ <option value="exact">is exactly</option> > [% END %] > </select> > <input id="value_mainheading" type="text" name="value" value="[% value | html %]" class="head-searchbox" /> >@@ -129,7 +129,7 @@ > [% END %] > [% END %] > </select> >- <input type="hidden" name="marclist" value="match" /> >+ <input type="hidden" name="marclist" value="exact" /> > <select name="operator"> > [% IF ( operator == 'contains' ) %] > <option value="contains" selected="selected">contains</option> >@@ -141,10 +141,10 @@ > [% ELSE %] > <option value="start">starts with</option> > [% END %] >- [% IF ( operator == 'is' ) %] >- <option value="is" selected="selected">is exactly</option> >+ [% IF ( operator == 'exact' ) %] >+ <option value="exact" selected="selected">is exactly</option> > [% ELSE %] >- <option value="is">is exactly</option> >+ <option value="exact">is exactly</option> > [% END %] > </select> > <input id="value_matchheading" type="text" name="value" value="[% value | html %]" class="head-searchbox" /> >@@ -197,10 +197,10 @@ > [% ELSE %] > <option value="start">starts with</option> > [% END %] >- [% IF ( operator == 'is' ) %] >- <option value="is" selected="selected">is exactly</option> >+ [% IF ( operator == 'exact' ) %] >+ <option value="exact" selected="selected">is exactly</option> > [% ELSE %] >- <option value="is">is exactly</option> >+ <option value="exact">is exactly</option> > [% END %] > </select> > <input id="value_anywhere" type="text" name="value" value="[% value | html %]" class="head-searchbox" /> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt >index b7c4879e9a..b2d6645e11 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt >@@ -55,7 +55,7 @@ > <select name="operator" id="anywhere"> > <option value="contains">contains</option> > <option value="start">starts with</option> >- <option value="is">is exactly</option> >+ <option value="exact">is exactly</option> > </select> > </li> > <li> >-- >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 26533
:
118255
|
118257
|
119929