mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Added create card action
This commit is contained in:
parent
12827ef0a6
commit
8ad0da2109
4 changed files with 62 additions and 0 deletions
|
|
@ -145,6 +145,23 @@ RulesHelper = {
|
|||
ChecklistItems.insert({title:itemsArray[i],checklistId:checkListId,cardId:card._id,'sort':0});
|
||||
}
|
||||
}
|
||||
if(action.actionType === 'createCard'){
|
||||
let list = Lists.findOne({title:action.listName,boardId});
|
||||
let listId = '';
|
||||
let swimlaneId = '';
|
||||
let swimlane = Swimlanes.findOne({title:action.swimlaneName,boardId});
|
||||
if(list == undefined){
|
||||
listId = '';
|
||||
}else{
|
||||
listId = list._id;
|
||||
}
|
||||
if(swimlane == undefined){
|
||||
swimlaneId = Swimlanes.findOne({title:"Default",boardId})._id;
|
||||
}else{
|
||||
swimlaneId = swimlane._id;
|
||||
}
|
||||
Cards.insert({title:action.cardName,listId,swimlaneId,sort:0,boardId});
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue