summaryrefslogtreecommitdiffstats
path: root/client/components/rules/triggers/boardTriggers.js
diff options
context:
space:
mode:
authorAngelo Gallarello <angelo.gallarell@gmail.com>2018-12-30 22:08:34 +0100
committerAngelo Gallarello <angelo.gallarell@gmail.com>2018-12-30 22:08:34 +0100
commita2d756074f05299248944ecce2cc87a9a28ab020 (patch)
tree2c3e61af27e8cce64caea39a3e642a0eae18857c /client/components/rules/triggers/boardTriggers.js
parentb2f23d619d1ff33e899080dca17d018f0e8d0963 (diff)
downloadwekan-a2d756074f05299248944ecce2cc87a9a28ab020.tar.gz
wekan-a2d756074f05299248944ecce2cc87a9a28ab020.tar.bz2
wekan-a2d756074f05299248944ecce2cc87a9a28ab020.zip
Added swimlane trigger
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,