summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngelo Gallarello <angelo.gallarell@gmail.com>2018-09-21 14:22:00 +0200
committerAngelo Gallarello <angelo.gallarell@gmail.com>2018-09-21 14:22:00 +0200
commit37a53e7466107d229a67a4c2efc4b25708bbe93d (patch)
treed017d73aa17b3665435c313c7a08c733ade6a7cc
parent254c7fe95183bb6ba787cfca6bfd5255a8fea42e (diff)
downloadwekan-37a53e7466107d229a67a4c2efc4b25708bbe93d.tar.gz
wekan-37a53e7466107d229a67a4c2efc4b25708bbe93d.tar.bz2
wekan-37a53e7466107d229a67a4c2efc4b25708bbe93d.zip
Fixed some rules
-rw-r--r--client/components/rules/triggers/checklistTriggers.js4
-rw-r--r--models/checklistItems.js4
-rw-r--r--server/rulesHelper.js8
3 files changed, 8 insertions, 8 deletions
diff --git a/client/components/rules/triggers/checklistTriggers.js b/client/components/rules/triggers/checklistTriggers.js
index 01f3effe..2272be29 100644
--- a/client/components/rules/triggers/checklistTriggers.js
+++ b/client/components/rules/triggers/checklistTriggers.js
@@ -78,7 +78,7 @@ BlazeComponent.extendComponent({
const actionSelected = this.find('#spec-comp-check-action').value;
const checklistId = this.find('#spec-comp-check-name').value;
const boardId = Session.get('currentBoard');
- if (actionSelected === 'added') {
+ if (actionSelected === 'completed') {
datas.triggerVar.set({
activityType: 'completeChecklist',
boardId,
@@ -86,7 +86,7 @@ BlazeComponent.extendComponent({
desc,
});
}
- if (actionSelected === 'removed') {
+ if (actionSelected === 'uncompleted') {
datas.triggerVar.set({
activityType: 'uncompleteChecklist',
boardId,
diff --git a/models/checklistItems.js b/models/checklistItems.js
index 8380bda7..7132bc7c 100644
--- a/models/checklistItems.js
+++ b/models/checklistItems.js
@@ -130,7 +130,7 @@ function publishChekListCompleted(userId, doc, fieldNames, modifier){
cardId: doc.cardId,
boardId,
checklistId: doc.checklistId,
- checklistName:doc.title,
+ checklistName:checkList.title,
};
Activities.insert(act);
}
@@ -148,7 +148,7 @@ function publishChekListUncompleted(userId, doc, fieldNames, modifier){
cardId: doc.cardId,
boardId,
checklistId: doc.checklistId,
- checklistName:doc.title,
+ checklistName:checkList.title,
};
Activities.insert(act);
}
diff --git a/server/rulesHelper.js b/server/rulesHelper.js
index e7e19b96..175af953 100644
--- a/server/rulesHelper.js
+++ b/server/rulesHelper.js
@@ -36,8 +36,8 @@ RulesHelper = {
if(action.actionType === 'moveCardToTop'){
let listId;
let list;
- if(activity.listTitle === '*'){
- listId = card.swimlaneId;
+ if(action.listTitle === '*'){
+ listId = card.listId;
list = card.list();
}else{
list = Lists.findOne({title: action.listTitle, boardId });
@@ -49,8 +49,8 @@ RulesHelper = {
if(action.actionType === 'moveCardToBottom'){
let listId;
let list;
- if(activity.listTitle === '*'){
- listId = card.swimlaneId;
+ if(action.listTitle === '*'){
+ listId = card.listId;
list = card.list();
}else{
list = Lists.findOne({title: action.listTitle, boardId});