Bugzilla – Attachment 151553 Details for
Bug 33802
On OPAC authority detail page, usage count in wrong (when using Elasticsearch)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33802: On OPAC authority detail page, usage count in erroneous
Bug-33802-On-OPAC-authority-detail-page-usage-coun.patch (text/plain), 1.57 KB, created by
Frédéric Demians
on 2023-05-23 08:40:31 UTC
(
hide
)
Description:
Bug 33802: On OPAC authority detail page, usage count in erroneous
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2023-05-23 08:40:31 UTC
Size:
1.57 KB
patch
obsolete
>From 78427c6a346ec3a6cef1a59760264f315673768b Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Tue, 23 May 2023 10:27:24 +0200 >Subject: [PATCH] Bug 33802: On OPAC authority detail page, usage count in > erroneous > >If QueryAutoTruncate is enabled, the biblio usage count of an authority >displayed on OPAC may be wrong. This is due to the fact that the authid >search being automatically truncated, a search for biblios using >authority 22 will retrieved also biblios using authorities 222, 22*. > >TO TEST: > >1. On a Koha with authorities, enable QueryAutoTruncate. >2. Go on opac-authoritiesdetail.pl page for an authority with the lowest > possible authid. Let say 1. >3. Confirm that you have a large biblios usage count, and that by > clicking on the link to see linked biblios, you get far less biblios > than expected. >4. Apply the patch. Repeat 2-3. >--- > Koha/Authorities.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Authorities.pm b/Koha/Authorities.pm >index 9d29346787..3345108a0c 100644 >--- a/Koha/Authorities.pm >+++ b/Koha/Authorities.pm >@@ -51,7 +51,7 @@ sub get_usage_count { > my $authid = $params->{authid} || return; > > my $searcher = Koha::SearchEngine::Search->new({ index => $Koha::SearchEngine::BIBLIOS_INDEX }); >- my ( $err, $result, $count ) = $searcher->simple_search_compat( 'an:' . $authid, 0, 0 ); >+ my ( $err, $result, $count ) = $searcher->simple_search_compat( "an:\"$authid\"", 0, 0 ); > if( $err ) { > warn "Error: $err from search for " . $authid; > return; >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33802
:
151553
|
151675