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)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 25 Jun 2021 13:51:21 +0000 (09:51 -0400)
commitcfe712367943da16e00ea0bee35b75d31d4f943c
treee393038c2abf3f57e4b57f3def7009fbf31aae10
parenta2f8ba3112699f589e21582a13061d1b7bf7c131
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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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