]> 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)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Mon, 24 May 2021 15:59:43 +0000 (15:59 +0000)
commit8647e3f6004255c4a426bcccc15eb5f06da38c4e
tree5310e78c9019330f246f85230a1cb27dd7f2183e
parentf4dfb74e26b13d843b104b2cce77ca6027754600
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>
(cherry picked from commit c62ca48c5619ceaa7f02d9aaf29bc029701885ac)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.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