summaryrefslogtreecommitdiffstats
path: root/client/components/rules/actions/boardActions.js
diff options
context:
space:
mode:
authorRomulus Tsai 蔡仲明 <urakagi@gmail.com>2020-05-08 09:35:11 +0800
committerRomulus Tsai 蔡仲明 <urakagi@gmail.com>2020-05-08 09:35:11 +0800
commitcfcc73724fcd394150d1b815d0a7a4c466e216b5 (patch)
treea9648255f14cd8b0e1ad8eee1f8d42337a0668bc /client/components/rules/actions/boardActions.js
parenta3658993128bdddd5d40f792c19281dc5eac51f5 (diff)
parent533bc045d06269dba2f42cdfe61817a1b3407974 (diff)
downloadwekan-cfcc73724fcd394150d1b815d0a7a4c466e216b5.tar.gz
wekan-cfcc73724fcd394150d1b815d0a7a4c466e216b5.tar.bz2
wekan-cfcc73724fcd394150d1b815d0a7a4c466e216b5.zip
Merge branch 'master' of https://github.com/wekan/wekan
Diffstat (limited to 'client/components/rules/actions/boardActions.js')
-rw-r--r--client/components/rules/actions/boardActions.js30
1 files changed, 25 insertions, 5 deletions
diff --git a/client/components/rules/actions/boardActions.js b/client/components/rules/actions/boardActions.js
index 8568d2bf..02910cc1 100644
--- a/client/components/rules/actions/boardActions.js
+++ b/client/components/rules/actions/boardActions.js
@@ -1,6 +1,22 @@
BlazeComponent.extendComponent({
onCreated() {},
+ boards() {
+ const boards = Boards.find(
+ {
+ archived: false,
+ 'members.userId': Meteor.userId(),
+ _id: {
+ $ne: Meteor.user().getTemplatesBoardId(),
+ },
+ },
+ {
+ sort: { sort: 1 /* boards default sorting */ },
+ },
+ );
+ return boards;
+ },
+
events() {
return [
{
@@ -52,15 +68,18 @@ BlazeComponent.extendComponent({
const ruleName = this.data().ruleName.get();
const trigger = this.data().triggerVar.get();
const actionSelected = this.find('#move-spec-action').value;
- const listTitle = this.find('#listName').value;
+ const swimlaneName = this.find('#swimlaneName').value;
+ const listName = this.find('#listName').value;
const boardId = Session.get('currentBoard');
+ const destBoardId = this.find('#board-id').value;
const desc = Utils.getTriggerActionDesc(event, this);
if (actionSelected === 'top') {
const triggerId = Triggers.insert(trigger);
const actionId = Actions.insert({
actionType: 'moveCardToTop',
- listTitle,
- boardId,
+ listName,
+ swimlaneName,
+ boardId: destBoardId,
desc,
});
Rules.insert({
@@ -74,8 +93,9 @@ BlazeComponent.extendComponent({
const triggerId = Triggers.insert(trigger);
const actionId = Actions.insert({
actionType: 'moveCardToBottom',
- listTitle,
- boardId,
+ listName,
+ swimlaneName,
+ boardId: destBoardId,
desc,
});
Rules.insert({