Bug 28513: Fix analytics search links so they don't match unrelated biblios
authorJoonas Kylmälä <joonas.kylmala@helsinki.fi>
Fri, 4 Jun 2021 11:06:53 +0000 (14:06 +0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 21 Jun 2021 08:50:09 +0000 (10:50 +0200)
commit0276ca0ce810173fc49d15391770a8b5a1b0e8aa
tree0fd77a0d1a5f7a6b66d20f04dedda1607b98467c
parenta0813c97c56cc828b6d3e99e77e6c879c05ca253
Bug 28513: Fix analytics search links so they don't match unrelated biblios

At least when using Searchengine=Elasticsearch what happened was that
without () parenthese included the search for Host-item field was done
only to the first token, the subsequent ones matched any
fields. Adding the parentheses restrict the search to Host-item search
field only.

To test:
 1) Set Searchengine = elasticsearch
 2) Make a biblio with 245a = "biológica paranaense." and 773a = "Acta"
 3) Go to a biblio with 245a = "Acta biológica paranaense" (in
 kohadevbox or create one if you need).
 4) Notice that the "Acta biológica paranaense" biblio's detail page link "Show
 analytics" takes to the "biológica paranaense" incorrectly just
 because the 773a has "Acta" and the words "biológica" and "paranaense"
 appear elsewhere in the biblio.
 5) Apply patch and notice the link is now not created at all

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
catalogue/detail.pl
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl
opac/opac-detail.pl