summaryrefslogtreecommitdiffstats
path: root/client/components/rules/actions/cardActions.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/rules/actions/cardActions.js')
-rw-r--r--client/components/rules/actions/cardActions.js23
1 files changed, 13 insertions, 10 deletions
diff --git a/client/components/rules/actions/cardActions.js b/client/components/rules/actions/cardActions.js
index 48120d91..571020a8 100644
--- a/client/components/rules/actions/cardActions.js
+++ b/client/components/rules/actions/cardActions.js
@@ -24,16 +24,17 @@ BlazeComponent.extendComponent({
const trigger = this.data().triggerVar.get();
const actionSelected = this.find('#label-action').value;
const labelId = this.find('#label-id').value;
+ const boardId = Session.get('currentBoard');
if(actionSelected == "add"){
const triggerId = Triggers.insert(trigger);
- const actionId = Actions.insert({actionType: "addLabel","labelId":labelId});
- Rules.insert({title: ruleName, triggerId: triggerId, actionId: actionId});
+ const actionId = Actions.insert({actionType: "addLabel","labelId":labelId,"boardId":boardId});
+ Rules.insert({title: ruleName, triggerId: triggerId, actionId: actionId,"boardId":boardId});
}
if(actionSelected == "remove"){
const triggerId = Triggers.insert(trigger);
- const actionId = Actions.insert({actionType: "removeLabel","labelId":labelId});
- Rules.insert({title: ruleName, triggerId: triggerId, actionId: actionId});
+ const actionId = Actions.insert({actionType: "removeLabel","labelId":labelId,"boardId":boardId});
+ Rules.insert({title: ruleName, triggerId: triggerId, actionId: actionId,"boardId":boardId});
}
},
@@ -42,23 +43,25 @@ BlazeComponent.extendComponent({
const trigger = this.data().triggerVar.get();
const actionSelected = this.find('#member-action').value;
const memberName = this.find('#member-name').value;
+ const boardId = Session.get('currentBoard');
if(actionSelected == "add"){
const triggerId = Triggers.insert(trigger);
- const actionId = Actions.insert({actionType: "addMember","memberName":memberName});
- Rules.insert({title: ruleName, triggerId: triggerId, actionId: actionId});
+ const actionId = Actions.insert({actionType: "addMember","memberName":memberName,"boardId":boardId});
+ Rules.insert({title: ruleName, triggerId: triggerId, actionId: actionId,"boardId":boardId});
}
if(actionSelected == "remove"){
const triggerId = Triggers.insert(trigger);
- const actionId = Actions.insert({actionType: "removeMember","memberName":memberName});
- Rules.insert({title: ruleName, triggerId: triggerId, actionId: actionId});
+ const actionId = Actions.insert({actionType: "removeMember","memberName":memberName,"boardId":boardId});
+ Rules.insert({title: ruleName, triggerId: triggerId, actionId: actionId,"boardId":boardId});
}
},
'click .js-add-removeall-action'(event) {
const ruleName = this.data().ruleName.get();
const trigger = this.data().triggerVar.get();
const triggerId = Triggers.insert(trigger);
- const actionId = Actions.insert({actionType: "removeMember","memberName":"*"});
- Rules.insert({title: ruleName, triggerId: triggerId, actionId: actionId});
+ const boardId = Session.get('currentBoard');
+ const actionId = Actions.insert({actionType: "removeMember","memberName":"*","boardId":boardId});
+ Rules.insert({title: ruleName, triggerId: triggerId, actionId: actionId,"boardId":boardId});
},
}];
},