Bug 17710 - C4::Matcher::get_matches and C4::ImportBatch::GetBestRecordMatch should...
commit6906b848a78ad4c7d52c1e7c7ce195f08cc6d2a6
authorDavid Cook <dcook@prosentient.com.au>
Wed, 11 Jan 2017 04:36:05 +0000 (11 15:36 +1100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 15 Jun 2017 18:27:46 +0000 (15 15:27 -0300)
treeb8fd091f0017c5b8c064ab97555aa23a6c40c060
parentf97addef42826c0007f91cace1f365de358a8b60
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>
C4/Matcher.pm