Bugzilla – Attachment 67632 Details for
Bug 19415
FindDuplicateAuthority is searching on biblioserver since 16.05
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19415: FindDuplicateAuthority is searching on biblioserver since 16.05
Bug-19415-FindDuplicateAuthority-is-searching-on-b.patch (text/plain), 2.16 KB, created by
Marcel de Rooy
on 2017-10-05 08:49:17 UTC
(
hide
)
Description:
Bug 19415: FindDuplicateAuthority is searching on biblioserver since 16.05
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-10-05 08:49:17 UTC
Size:
2.16 KB
patch
obsolete
>From 70e0b674c25fc22f12460d30b920cc05f6240cc8 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 5 Oct 2017 10:41:33 +0200 >Subject: [PATCH] Bug 19415: FindDuplicateAuthority is searching on > biblioserver since 16.05 >Content-Type: text/plain; charset=utf-8 > >Commit b4392018bc1f9bf6a2f7dfe70b488856ad3a3897 [Bug 12478: make things using SimpleSearch use the new version] changed sub FindDuplicateAuthority and replaced this call (from 3.22.x) in 16.05 (pushed April 2016): > my ($error, $results, $total_hits) = C4::Search::SimpleSearch( $query, 0, 1, [ "authorityserver" ] ); > >The new call does unfortunately not include the authorityserver: > my ($error, $results, $total_hits) = $searcher->simple_search_compat( $query, 0, 1 ); >Simple_search_compat redirects to C4/Search/SimpleSearch and SimpleSearch assumes a biblioserver if no server is passed. > >This effectively makes FindDuplicateAuthority useless since we will no longer find duplicates and we could see an error like this in the log: > 16:51:42-04/10 zebrasrv(51) [request] Search biblios ERROR 114 1 1+0 RPN @attrset Bib-1 @and @attr 1=authtype PERSO_NAME @attr 1=Heading Moerenhout > >The fix is obviously trivial. > >Test plan: >[1] Go to Authorities. >[2] Add a new authority PERSO_NAME with 100a Moerenhout. >[3] Repeat step 2. Verify that you get the duplicate authority warning. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/AuthoritiesMarc.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index 6859041..6dbe516 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -770,7 +770,7 @@ sub FindDuplicateAuthority { > } > } > my $searcher = Koha::SearchEngine::Search->new({index => $Koha::SearchEngine::AUTHORITIES_INDEX}); >- my ($error, $results, $total_hits) = $searcher->simple_search_compat( $query, 0, 1 ); >+ my ($error, $results, $total_hits) = $searcher->simple_search_compat( $query, 0, 1, [ 'authorityserver' ] ); > # there is at least 1 result => return the 1st one > if (!defined $error && @{$results} ) { > my $marcrecord = C4::Search::new_record_from_zebra( >-- >2.1.4
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 19415
:
67632
|
67788
|
67846