mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
fix cardnumber assignment for moved or copied card
This commit is contained in:
parent
e8522c323f
commit
2fd741bf54
1 changed files with 5 additions and 0 deletions
|
|
@ -577,6 +577,7 @@ Cards.helpers({
|
|||
|
||||
delete this._id;
|
||||
this.boardId = boardId;
|
||||
this.cardNumber = Boards.findOne(boardId).getNextCardNumber();
|
||||
this.swimlaneId = swimlaneId;
|
||||
this.listId = listId;
|
||||
const _id = Cards.insert(this);
|
||||
|
|
@ -1989,8 +1990,12 @@ Cards.mutations({
|
|||
'_id',
|
||||
);
|
||||
|
||||
// assign the new card number from the target board
|
||||
const newCardNumber = newBoard.getNextCardNumber();
|
||||
|
||||
Object.assign(mutatedFields, {
|
||||
labelIds: newCardLabelIds,
|
||||
cardNumber: newCardNumber
|
||||
});
|
||||
|
||||
mutatedFields.customFields = this.mapCustomFieldsToBoard(newBoard._id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue