summaryrefslogtreecommitdiffstats
path: root/client/components/rules/actions/boardActions.js
diff options
context:
space:
mode:
authorRomulus Urakagi Tsai <urakagi@gmail.com>2020-02-13 09:02:26 +0000
committerRomulus Urakagi Tsai <urakagi@gmail.com>2020-02-13 09:02:26 +0000
commit4b196d537896f39fb76090020cb5851a699546eb (patch)
tree28e2e025ce90645ed360bb8c26ab39e6f40214e4 /client/components/rules/actions/boardActions.js
parentb34ed58289a3dae5838d3b621260938a3ecf52d5 (diff)
parent3fcde252f705f9527f7190517082a047714a4eec (diff)
downloadwekan-4b196d537896f39fb76090020cb5851a699546eb.tar.gz
wekan-4b196d537896f39fb76090020cb5851a699546eb.tar.bz2
wekan-4b196d537896f39fb76090020cb5851a699546eb.zip
Merge branch 'master' of https://github.com/wekan/wekan into lib-change
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..c2f2375a 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: ['title'],
+ },
+ );
+ 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({