From e149eec260cd00c19d41f84f6bba914c71d10a70 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 19 May 2021 10:54:49 +0000 Subject: [PATCH] Bug 22785: (follow-up) Don't sort by chosen and fix selection of matches Previously the sorting took 'chosen' into account and would move a selected match to the top on next load - it is better to preserve the same sorting every time When loading matches the 'cehcked' variable was not being cleared, so multiple matches were being marked 'checked="checked"'. Fixing this ensures the correct record displays as chosen Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Ben Daeuber Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- C4/ImportBatch.pm | 2 +- .../intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm index f693059d0d..47eeae5880 100644 --- a/C4/ImportBatch.pm +++ b/C4/ImportBatch.pm @@ -1485,7 +1485,7 @@ sub GetImportRecordMatches { JOIN import_record_matches USING (import_record_id) LEFT JOIN biblio ON (biblionumber = candidate_match_id) WHERE import_record_id = ? - ORDER BY score DESC, chosen DESC, biblionumber DESC"); + ORDER BY score DESC, biblionumber DESC"); $sth->bind_param(1, $import_record_id); my $results = []; $sth->execute(); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt index 7eb09b1c44..ddd053863d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt @@ -582,8 +582,8 @@ ); $('td:eq(5) ul', nRow).append('
  • ' + _("View") + '
  • '); + checked = ""; }); - checked = ""; if( !any_checked ){ checked = 'checked="checked"'; } $('td:eq(4) ul', nRow).prepend('
  • '); $('td:eq(5) ul', nRow).prepend('
  •  
  • '); -- 2.20.1