diff options
author | Ymeramees <ymeramees@servu> | 2018-09-08 07:04:55 +0300 |
---|---|---|
committer | Ymeramees <ymeramees@servu> | 2018-09-08 07:04:55 +0300 |
commit | cdab6076cc7e1acda24442b28625b929eb4a5da6 (patch) | |
tree | f878e8fbbc197cd03f81fe0a6561170ab12f78d1 /models/cards.js | |
parent | 6c0b6ca6702b7f605b43eee8579ce1181f59f09e (diff) | |
parent | 2ef8803dfd37ff204e541a8237a69741b5945eab (diff) | |
download | wekan-cdab6076cc7e1acda24442b28625b929eb4a5da6.tar.gz wekan-cdab6076cc7e1acda24442b28625b929eb4a5da6.tar.bz2 wekan-cdab6076cc7e1acda24442b28625b929eb4a5da6.zip |
Merge remote-tracking branch 'upstream/master' into devel
Updated to upstream master 1.43
Diffstat (limited to 'models/cards.js')
-rw-r--r-- | models/cards.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/models/cards.js b/models/cards.js index 11f08283..927ca9ce 100644 --- a/models/cards.js +++ b/models/cards.js @@ -914,8 +914,9 @@ Cards.mutations({ //FUNCTIONS FOR creation of Activities -function cardMove(userId, doc, fieldNames, oldListId) { - if (_.contains(fieldNames, 'listId') && doc.listId !== oldListId) { +function cardMove(userId, doc, fieldNames, oldListId, oldSwimlaneId) { + if ((_.contains(fieldNames, 'listId') && doc.listId !== oldListId) || + (_.contains(fieldNames, 'swimlaneId') && doc.swimlaneId !== oldSwimlaneId)){ Activities.insert({ userId, oldListId, @@ -923,6 +924,8 @@ function cardMove(userId, doc, fieldNames, oldListId) { listId: doc.listId, boardId: doc.boardId, cardId: doc._id, + swimlaneId: doc.swimlaneId, + oldSwimlaneId, }); } } @@ -990,6 +993,7 @@ function cardCreation(userId, doc) { boardId: doc.boardId, listId: doc.listId, cardId: doc._id, + swimlaneId: doc.swimlaneId, }); } @@ -1037,7 +1041,8 @@ if (Meteor.isServer) { //New activity for card moves Cards.after.update(function (userId, doc, fieldNames) { const oldListId = this.previous.listId; - cardMove(userId, doc, fieldNames, oldListId); + const oldSwimlaneId = this.previous.swimlaneId; + cardMove(userId, doc, fieldNames, oldListId, oldSwimlaneId); }); // Add a new activity if we add or remove a member to the card |