From dcff70c983879aa87195ba4aa69471dae98deda1 Mon Sep 17 00:00:00 2001 From: Martin Filser Date: Tue, 8 Feb 2022 22:20:21 +0100 Subject: [PATCH] Copy card is now at the top too (same as move card) --- client/components/cards/cardDetails.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 2e433a56f..4b84b0957 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -968,8 +968,10 @@ Template.copyCardPopup.events({ const boardId = bSelect.options[bSelect.selectedIndex].value; const textarea = $('#copy-card-title'); const title = textarea.val().trim(); - // insert new card to the bottom of new list - card.sort = Lists.findOne(card.listId).cards().count(); + + // insert new card to the top of new list + const minOrder = card.getMinSort(listId, swimlaneId); + card.sort = minOrder - 1; if (title) { card.title = title;