mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Use a Meteor call to copy a board
The current method was to copy a board on the client side. But not all data was available for copying rules. Moving the copy function to the server side solves this problem.
This commit is contained in:
parent
1c7a9e4de8
commit
ff8a36653a
3 changed files with 30 additions and 6 deletions
|
@ -675,12 +675,19 @@ BlazeComponent.extendComponent({
|
|||
element.type = 'swimlane';
|
||||
_id = element.copy(this.boardId);
|
||||
} else if (this.isBoardTemplateSearch) {
|
||||
board = Boards.findOne(element.linkedId);
|
||||
board.sort = Boards.find({ archived: false }).count();
|
||||
board.type = 'board';
|
||||
board.title = element.title;
|
||||
delete board.slug;
|
||||
_id = board.copy();
|
||||
Meteor.call(
|
||||
'copyBoard',
|
||||
element.linkedId,
|
||||
{
|
||||
sort: Boards.find({ archived: false }).count(),
|
||||
type: 'board',
|
||||
title: element.title,
|
||||
},
|
||||
(err, data) => {
|
||||
_id = data;
|
||||
},
|
||||
);
|
||||
// _id = board.copy();
|
||||
}
|
||||
Popup.close();
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue