From cd6c00d8da836f1bb91d52f06b8c97e859e28bce 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 --- C4/ImportBatch.pm | 2 +- koha-tmpl/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 9e59a88efa..2ce73fd5e4 100644 --- a/C4/ImportBatch.pm +++ b/C4/ImportBatch.pm @@ -1465,7 +1465,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 eeae4450ae..51bc5aed96 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 @@ -575,8 +575,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.11.0