summaryrefslogtreecommitdiffstats
path: root/models/lists.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-02-28 00:54:29 +0200
committerLauri Ojansivu <x@xet7.org>2019-02-28 00:54:29 +0200
commiteeb8d4b3de39658f1ed9927cc85a968a9b9fe8c4 (patch)
treef46123f64a068ee1d6ed6c2f05ac990abdc7a1a5 /models/lists.js
parent82a728df7111413e4a1b106f4cd18265da5f397b (diff)
parentad75c541cff2c27c441a0fb67d52c57180020594 (diff)
downloadwekan-eeb8d4b3de39658f1ed9927cc85a968a9b9fe8c4.tar.gz
wekan-eeb8d4b3de39658f1ed9927cc85a968a9b9fe8c4.tar.bz2
wekan-eeb8d4b3de39658f1ed9927cc85a968a9b9fe8c4.zip
Merge branch 'edge' into meteor-1.8
Diffstat (limited to 'models/lists.js')
-rw-r--r--models/lists.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/models/lists.js b/models/lists.js
index d76c961c..a8e597ee 100644
--- a/models/lists.js
+++ b/models/lists.js
@@ -137,12 +137,15 @@ Lists.allow({
});
Lists.helpers({
- copy(swimlaneId) {
+ copy(boardId, swimlaneId) {
const oldId = this._id;
const oldSwimlaneId = this.swimlaneId || null;
+ this.boardId = boardId;
+ this.swimlaneId = swimlaneId;
+
let _id = null;
existingListWithSameName = Lists.findOne({
- boardId: this.boardId,
+ boardId,
title: this.title,
archived: false,
});
@@ -160,11 +163,7 @@ Lists.helpers({
listId: oldId,
archived: false,
}).forEach((card) => {
- card.type = 'cardType-card';
- card.listId = _id;
- card.boardId = this.boardId;
- card.swimlaneId = swimlaneId;
- card.copy();
+ card.copy(boardId, swimlaneId, _id);
});
},