]> git.koha-community.org Git - koha.git/commit
Bug 19415: FindDuplicateAuthority is searching on biblioserver since 16.05
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 5 Oct 2017 08:41:33 +0000 (10:41 +0200)
committerKatrin Fischer <katrin.fischer.83@web.de>
Sun, 29 Oct 2017 18:13:03 +0000 (19:13 +0100)
commita26aacbc4e07e8fcc7a170a654a81979defecc0b
tree3c9b7cced87c6de5ff664ddc741fc53110952b3e
parent6fb761fbf7c4446a5e54c9d4fbd31e4b55e88189
Bug 19415: FindDuplicateAuthority is searching on biblioserver since 16.05

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>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 56500e8e676782155c5717e8db9786af394252d8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2ffe76350ee6373dc27ba8ac098a468875c2f4fb)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
C4/AuthoritiesMarc.pm