Bug 17710 - C4::Matcher::get_matches and C4::ImportBatch::GetBestRecordMatch should...
commit50c886e0a96a39a2906756dae42ade5c9fd0f9d0
authorDavid Cook <dcook@prosentient.com.au>
Wed, 11 Jan 2017 04:36:05 +0000 (11 15:36 +1100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 20 Jun 2017 08:29:20 +0000 (20 10:29 +0200)
tree4be4ebe1773e6af4a057831b1de044abbf48e974
parentd80b7e2841abddc4f6ff8510df006aa310ef352e
Bug 17710 - C4::Matcher::get_matches and C4::ImportBatch::GetBestRecordMatch should use same logic

C4::ImportBatch::GetBestRecordMatch uses SQL to sort by score descending
then candidate_match_id descending. With C4::Matcher::get_matches, I
implement the same sort but use Perl code to do it, since we're sorting
search results.

It's a simple change, but it's in a big block of code, so I don't have
unit tests.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6906b848a78ad4c7d52c1e7c7ce195f08cc6d2a6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Matcher.pm