summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngelo Gallarello <angelo.gallarell@gmail.com>2018-09-12 12:19:53 +0200
committerAngelo Gallarello <angelo.gallarell@gmail.com>2018-09-12 12:19:53 +0200
commite649c79bb71140a15f8e65fdb98ecb367469c0b7 (patch)
tree5e231b6d762e99e6557582e0a51da5a516988a6a
parent34b37116cf8c618a4ea12b13d969c24654f4248b (diff)
downloadwekan-e649c79bb71140a15f8e65fdb98ecb367469c0b7.tar.gz
wekan-e649c79bb71140a15f8e65fdb98ecb367469c0b7.tar.bz2
wekan-e649c79bb71140a15f8e65fdb98ecb367469c0b7.zip
Fixed board id bug in move
-rw-r--r--client/components/rules/rulesList.js3
-rw-r--r--i18n/en.i18n.json2
-rw-r--r--server/rulesHelper.js5
3 files changed, 6 insertions, 4 deletions
diff --git a/client/components/rules/rulesList.js b/client/components/rules/rulesList.js
index caafe29f..9b97a7c8 100644
--- a/client/components/rules/rulesList.js
+++ b/client/components/rules/rulesList.js
@@ -4,7 +4,8 @@ BlazeComponent.extendComponent({
},
rules() {
- return Rules.find({});
+ const boardId = Session.get('currentBoard');
+ return Rules.find({"boardId":boardId});
},
events() {
return [{}];
diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json
index f1cc56ee..7c93ec60 100644
--- a/i18n/en.i18n.json
+++ b/i18n/en.i18n.json
@@ -548,7 +548,7 @@
"r-completed": "Completed",
"r-made-incomplete": "Made incomplete",
"r-when-a-item": "When a checklist item is",
- "r-when-the-item": "When the checklist item is",
+ "r-when-the-item": "When the checklist item",
"r-checked": "Checked",
"r-unchecked": "Unchecked",
"r-move-card-to": "Move card to",
diff --git a/server/rulesHelper.js b/server/rulesHelper.js
index 2e9f58f4..28fa59d9 100644
--- a/server/rulesHelper.js
+++ b/server/rulesHelper.js
@@ -40,6 +40,7 @@ RulesHelper = {
console.log("Performing action - Action");
console.log(action);
const card = Cards.findOne({_id:activity.cardId});
+ const boardId = activity.boardId;
if(action.actionType == "moveCardToTop"){
let listId;
let list;
@@ -47,7 +48,7 @@ RulesHelper = {
listId = card.swimlaneId;
list = card.list();
}else{
- list = Lists.findOne({title: action.listTitle});
+ list = Lists.findOne({title: action.listTitle, boardId:boardId });;
listId = list._id;
}
const minOrder = _.min(list.cards(card.swimlaneId).map((c) => c.sort));
@@ -60,7 +61,7 @@ RulesHelper = {
listId = card.swimlaneId;
list = card.list();
}else{
- list = Lists.findOne({title: action.listTitle});
+ list = Lists.findOne({title: action.listTitle, boardId:boardId});
listId = list._id;
}
const maxOrder = _.max(list.cards(card.swimlaneId).map((c) => c.sort));