From a58cf90a3146f385671e6d82ae65de4f36d33316 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia 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 Signed-off-by: David Cook Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart --- .../prog/en/includes/auth-finder-search.inc | 24 ++++++++--------- .../prog/en/includes/authorities-search.inc | 26 +++++++++---------- .../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 %] [% END %] - [% IF ( operator_mainstr == 'is' ) %] - + [% IF ( operator_mainstr == 'exact' ) %] + [% ELSE %] - + [% END %] @@ -57,10 +57,10 @@ [% ELSE %] [% END %] - [% IF ( operator_main == 'is' ) %] - + [% IF ( operator_main == 'exact' ) %] + [% ELSE %] - + [% END %] @@ -82,10 +82,10 @@ [% ELSE %] [% END %] - [% IF ( operator_match == 'is' ) %] - + [% IF ( operator_match == 'exact' ) %] + [% ELSE %] - + [% END %] @@ -106,10 +106,10 @@ [% ELSE %] [% END %] - [% IF ( operator_any == 'is' ) %] - + [% IF ( operator_any == 'exact' ) %] + [% ELSE %] - + [% END %] 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 %] [% END %] - [% IF ( operator == 'is' ) %] - + [% IF ( operator == 'exact' ) %] + [% ELSE %] - + [% END %] @@ -87,10 +87,10 @@ [% ELSE %] [% END %] - [% IF ( operator == 'is' ) %] - + [% IF ( operator == 'exact' ) %] + [% ELSE %] - + [% END %] @@ -129,7 +129,7 @@ [% END %] [% END %] - + @@ -197,10 +197,10 @@ [% ELSE %] [% END %] - [% IF ( operator == 'is' ) %] - + [% IF ( operator == 'exact' ) %] + [% ELSE %] - + [% END %] 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 8c1bffe7bc..9659e5ddcb 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 @@
  • -- 2.39.5