diff options
author | Angelo Gallarello <angelo.gallarell@gmail.com> | 2018-08-17 14:16:56 +0200 |
---|---|---|
committer | Angelo Gallarello <angelo.gallarell@gmail.com> | 2018-08-17 14:16:56 +0200 |
commit | 3b62b5ec5dd34eec323c14d466fe07e34287e7b0 (patch) | |
tree | 48f48f035460d12df8ad37234018c69ffa35b47b /models | |
parent | 2f24dcfc7d2f1b426e83459ed5328529a440955d (diff) | |
download | wekan-3b62b5ec5dd34eec323c14d466fe07e34287e7b0.tar.gz wekan-3b62b5ec5dd34eec323c14d466fe07e34287e7b0.tar.bz2 wekan-3b62b5ec5dd34eec323c14d466fe07e34287e7b0.zip |
Fixed triggers to use names and not id
Diffstat (limited to 'models')
-rw-r--r-- | models/cards.js | 4 | ||||
-rw-r--r-- | models/checklistItems.js | 5 | ||||
-rw-r--r-- | models/checklists.js | 2 |
3 files changed, 11 insertions, 0 deletions
diff --git a/models/cards.js b/models/cards.js index 364f5a39..c5aceeb7 100644 --- a/models/cards.js +++ b/models/cards.js @@ -561,6 +561,7 @@ function cardMove(userId, doc, fieldNames, oldListId) { userId, oldListId, activityType: 'moveCard', + listName: doc.title, listId: doc.listId, boardId: doc.boardId, cardId: doc._id, @@ -574,6 +575,7 @@ function cardState(userId, doc, fieldNames) { Activities.insert({ userId, activityType: 'archivedCard', + listName: doc.title, boardId: doc.boardId, listId: doc.listId, cardId: doc._id, @@ -583,6 +585,7 @@ function cardState(userId, doc, fieldNames) { userId, activityType: 'restoredCard', boardId: doc.boardId, + listName: doc.title, listId: doc.listId, cardId: doc._id, }); @@ -664,6 +667,7 @@ function cardCreation(userId, doc) { userId, activityType: 'createCard', boardId: doc.boardId, + listName: doc.title, listId: doc.listId, cardId: doc._id, }); diff --git a/models/checklistItems.js b/models/checklistItems.js index 1378e0f5..669003bb 100644 --- a/models/checklistItems.js +++ b/models/checklistItems.js @@ -70,6 +70,7 @@ function itemCreation(userId, doc) { boardId, checklistId: doc.checklistId, checklistItemId: doc._id, + checklistItemName:doc.title }); } @@ -83,6 +84,7 @@ function itemRemover(userId, doc) { boardId, checklistId: doc.checklistId, checklistItemId: doc._id, + checklistItemName:doc.title }); Activities.remove({ checklistItemId: doc._id, @@ -105,6 +107,7 @@ function publishCheckActivity(userId,doc){ boardId, checklistId: doc.checklistId, checklistItemId: doc._id, + checklistItemName:doc.title } console.log(act); Activities.insert(act); @@ -122,6 +125,7 @@ function publishChekListCompleted(userId,doc,fieldNames,modifier){ cardId: doc.cardId, boardId, checklistId: doc.checklistId, + checklistName:doc.title } Activities.insert(act); } @@ -139,6 +143,7 @@ function publishChekListUncompleted(userId,doc,fieldNames,modifier){ cardId: doc.cardId, boardId, checklistId: doc.checklistId, + checklistName:doc.title } Activities.insert(act); } diff --git a/models/checklists.js b/models/checklists.js index 3f07c858..4a43818c 100644 --- a/models/checklists.js +++ b/models/checklists.js @@ -91,6 +91,7 @@ if (Meteor.isServer) { cardId: doc.cardId, boardId: Cards.findOne(doc.cardId).boardId, checklistId: doc._id, + checklistName:doc.title }); }); @@ -107,6 +108,7 @@ if (Meteor.isServer) { cardId: doc.cardId, boardId: Cards.findOne(doc.cardId).boardId, checklistId: doc._id, + checklistName:doc.title }); |