summaryrefslogtreecommitdiffstats
path: root/client/components/rules/triggers/boardTriggers.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/rules/triggers/boardTriggers.js')
-rw-r--r--client/components/rules/triggers/boardTriggers.js37
1 files changed, 13 insertions, 24 deletions
diff --git a/client/components/rules/triggers/boardTriggers.js b/client/components/rules/triggers/boardTriggers.js
index 40c5b07e..b822d643 100644
--- a/client/components/rules/triggers/boardTriggers.js
+++ b/client/components/rules/triggers/boardTriggers.js
@@ -8,60 +8,48 @@ BlazeComponent.extendComponent({
'click .js-add-gen-trigger' (event) {
const desc = Utils.getTriggerActionDesc(event, this);
const datas = this.data();
- const actionSelected = this.find('#gen-action').value;
const boardId = Session.get('currentBoard');
- if (actionSelected === 'created') {
- datas.triggerVar.set({
+ datas.triggerVar.set({
activityType: 'createCard',
boardId,
'listName': '*',
desc,
});
- }
- if (actionSelected === 'removed') {
- datas.triggerVar.set({
- activityType: 'removeCard',
- boardId,
- desc,
- });
- }
},
'click .js-add-create-trigger' (event) {
const desc = Utils.getTriggerActionDesc(event, this);
const datas = this.data();
- const actionSelected = this.find('#create-action').value;
const listName = this.find('#create-list-name').value;
+ const swimlaneName = this.find('#create-swimlane-name').value;
+ if(swimlaneName == undefined || swimlaneName == ""){
+ swimlaneName = "*";
+ }
const boardId = Session.get('currentBoard');
- if (actionSelected === 'created') {
- datas.triggerVar.set({
+ datas.triggerVar.set({
activityType: 'createCard',
boardId,
+ swimlaneName,
listName,
desc,
});
- }
- if (actionSelected === 'removed') {
- datas.triggerVar.set({
- activityType: 'removeCard',
- boardId,
- listName,
- desc,
- });
- }
},
'click .js-add-moved-trigger' (event) {
const datas = this.data();
const desc = Utils.getTriggerActionDesc(event, this);
-
+ const swimlaneName = this.find('#create-swimlane-name').value;
const actionSelected = this.find('#move-action').value;
const listName = this.find('#move-list-name').value;
const boardId = Session.get('currentBoard');
+ if(swimlaneName == undefined || swimlaneName == ""){
+ swimlaneName = "*";
+ }
if (actionSelected === 'moved-to') {
datas.triggerVar.set({
activityType: 'moveCard',
boardId,
listName,
+ swimlaneName,
'oldListName': '*',
desc,
});
@@ -70,6 +58,7 @@ BlazeComponent.extendComponent({
datas.triggerVar.set({
activityType: 'moveCard',
boardId,
+ swimlaneName,
'listName': '*',
'oldListName': listName,
desc,