]> git.koha-community.org Git - koha.git/commit
Bug 26533: Fix 'is exactly' search for authorities
authorAleisha Amohia <aleishaamohia@hotmail.com>
Tue, 9 Mar 2021 21:33:16 +0000 (10:33 +1300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 29 Apr 2021 12:47:09 +0000 (14:47 +0200)
commitc62ca48c5619ceaa7f02d9aaf29bc029701885ac
tree921884e0e721aba53610745ee6148ca5e156a88c
parent712d93cb6e12ba6cd1b7569eda77d939b0627dc7
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 <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a58cf90a3146f385671e6d82ae65de4f36d33316)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt