mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 07:50:12 +01:00
Fixed board id bug in move
This commit is contained in:
parent
34b37116cf
commit
e649c79bb7
3 changed files with 6 additions and 4 deletions
|
|
@ -4,7 +4,8 @@ BlazeComponent.extendComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
rules() {
|
rules() {
|
||||||
return Rules.find({});
|
const boardId = Session.get('currentBoard');
|
||||||
|
return Rules.find({"boardId":boardId});
|
||||||
},
|
},
|
||||||
events() {
|
events() {
|
||||||
return [{}];
|
return [{}];
|
||||||
|
|
|
||||||
|
|
@ -548,7 +548,7 @@
|
||||||
"r-completed": "Completed",
|
"r-completed": "Completed",
|
||||||
"r-made-incomplete": "Made incomplete",
|
"r-made-incomplete": "Made incomplete",
|
||||||
"r-when-a-item": "When a checklist item is",
|
"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-checked": "Checked",
|
||||||
"r-unchecked": "Unchecked",
|
"r-unchecked": "Unchecked",
|
||||||
"r-move-card-to": "Move card to",
|
"r-move-card-to": "Move card to",
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ RulesHelper = {
|
||||||
console.log("Performing action - Action");
|
console.log("Performing action - Action");
|
||||||
console.log(action);
|
console.log(action);
|
||||||
const card = Cards.findOne({_id:activity.cardId});
|
const card = Cards.findOne({_id:activity.cardId});
|
||||||
|
const boardId = activity.boardId;
|
||||||
if(action.actionType == "moveCardToTop"){
|
if(action.actionType == "moveCardToTop"){
|
||||||
let listId;
|
let listId;
|
||||||
let list;
|
let list;
|
||||||
|
|
@ -47,7 +48,7 @@ RulesHelper = {
|
||||||
listId = card.swimlaneId;
|
listId = card.swimlaneId;
|
||||||
list = card.list();
|
list = card.list();
|
||||||
}else{
|
}else{
|
||||||
list = Lists.findOne({title: action.listTitle});
|
list = Lists.findOne({title: action.listTitle, boardId:boardId });;
|
||||||
listId = list._id;
|
listId = list._id;
|
||||||
}
|
}
|
||||||
const minOrder = _.min(list.cards(card.swimlaneId).map((c) => c.sort));
|
const minOrder = _.min(list.cards(card.swimlaneId).map((c) => c.sort));
|
||||||
|
|
@ -60,7 +61,7 @@ RulesHelper = {
|
||||||
listId = card.swimlaneId;
|
listId = card.swimlaneId;
|
||||||
list = card.list();
|
list = card.list();
|
||||||
}else{
|
}else{
|
||||||
list = Lists.findOne({title: action.listTitle});
|
list = Lists.findOne({title: action.listTitle, boardId:boardId});
|
||||||
listId = list._id;
|
listId = list._id;
|
||||||
}
|
}
|
||||||
const maxOrder = _.max(list.cards(card.swimlaneId).map((c) => c.sort));
|
const maxOrder = _.max(list.cards(card.swimlaneId).map((c) => c.sort));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue