mirror of
https://github.com/wekan/wekan.git
synced 2026-02-03 23:21:47 +01:00
Fixed errors
This commit is contained in:
parent
8ad0da2109
commit
4d8b2029d2
7 changed files with 60 additions and 64 deletions
|
|
@ -135,32 +135,32 @@ RulesHelper = {
|
|||
if(action.actionType === 'addSwimlane'){
|
||||
Swimlanes.insert({
|
||||
title: action.swimlaneName,
|
||||
boardId
|
||||
boardId,
|
||||
});
|
||||
}
|
||||
if(action.actionType === 'addChecklistWithItems'){
|
||||
const checkListId = Checklists.insert({'title':action.checklistName, 'cardId':card._id, 'sort':0});
|
||||
const itemsArray = action.checklistItems.split(',');
|
||||
for(let i = 0;i <itemsArray.length;i++){
|
||||
ChecklistItems.insert({title:itemsArray[i],checklistId:checkListId,cardId:card._id,'sort':0});
|
||||
}
|
||||
const checkListId = Checklists.insert({'title':action.checklistName, 'cardId':card._id, 'sort':0});
|
||||
const itemsArray = action.checklistItems.split(',');
|
||||
for(let i = 0; i <itemsArray.length; i++){
|
||||
ChecklistItems.insert({title:itemsArray[i], checklistId:checkListId, cardId:card._id, 'sort':0});
|
||||
}
|
||||
}
|
||||
if(action.actionType === 'createCard'){
|
||||
let list = Lists.findOne({title:action.listName,boardId});
|
||||
const list = Lists.findOne({title:action.listName, boardId});
|
||||
let listId = '';
|
||||
let swimlaneId = '';
|
||||
let swimlane = Swimlanes.findOne({title:action.swimlaneName,boardId});
|
||||
const 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;
|
||||
swimlaneId = Swimlanes.findOne({title:'Default', boardId})._id;
|
||||
}else{
|
||||
swimlaneId = swimlane._id;
|
||||
}
|
||||
Cards.insert({title:action.cardName,listId,swimlaneId,sort:0,boardId});
|
||||
Cards.insert({title:action.cardName, listId, swimlaneId, sort:0, boardId});
|
||||
}
|
||||
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,57 +1,57 @@
|
|||
TriggersDef = {
|
||||
createCard:{
|
||||
matchingFields: ['boardId', 'listName','userId','swimlaneName','cardTitle'],
|
||||
matchingFields: ['boardId', 'listName', 'userId', 'swimlaneName', 'cardTitle'],
|
||||
},
|
||||
moveCard:{
|
||||
matchingFields: ['boardId', 'listName', 'oldListName','userId','swimlaneName'],
|
||||
matchingFields: ['boardId', 'listName', 'oldListName', 'userId', 'swimlaneName'],
|
||||
},
|
||||
archivedCard:{
|
||||
matchingFields: ['boardId','userId'],
|
||||
matchingFields: ['boardId', 'userId'],
|
||||
},
|
||||
restoredCard:{
|
||||
matchingFields: ['boardId','userId'],
|
||||
matchingFields: ['boardId', 'userId'],
|
||||
},
|
||||
joinMember:{
|
||||
matchingFields: ['boardId', 'username','userId'],
|
||||
matchingFields: ['boardId', 'username', 'userId'],
|
||||
},
|
||||
unjoinMember:{
|
||||
matchingFields: ['boardId', 'username','userId'],
|
||||
matchingFields: ['boardId', 'username', 'userId'],
|
||||
},
|
||||
addChecklist:{
|
||||
matchingFields: ['boardId', 'checklistName','userId'],
|
||||
matchingFields: ['boardId', 'checklistName', 'userId'],
|
||||
},
|
||||
removeChecklist:{
|
||||
matchingFields: ['boardId', 'checklistName','userId'],
|
||||
matchingFields: ['boardId', 'checklistName', 'userId'],
|
||||
},
|
||||
completeChecklist:{
|
||||
matchingFields: ['boardId', 'checklistName','userId'],
|
||||
matchingFields: ['boardId', 'checklistName', 'userId'],
|
||||
},
|
||||
uncompleteChecklist:{
|
||||
matchingFields: ['boardId', 'checklistName','userId'],
|
||||
matchingFields: ['boardId', 'checklistName', 'userId'],
|
||||
},
|
||||
addedChecklistItem:{
|
||||
matchingFields: ['boardId', 'checklistItemName','userId'],
|
||||
matchingFields: ['boardId', 'checklistItemName', 'userId'],
|
||||
},
|
||||
removedChecklistItem:{
|
||||
matchingFields: ['boardId', 'checklistItemName','userId'],
|
||||
matchingFields: ['boardId', 'checklistItemName', 'userId'],
|
||||
},
|
||||
checkedItem:{
|
||||
matchingFields: ['boardId', 'checklistItemName','userId'],
|
||||
matchingFields: ['boardId', 'checklistItemName', 'userId'],
|
||||
},
|
||||
uncheckedItem:{
|
||||
matchingFields: ['boardId', 'checklistItemName','userId'],
|
||||
matchingFields: ['boardId', 'checklistItemName', 'userId'],
|
||||
},
|
||||
addAttachment:{
|
||||
matchingFields: ['boardId','userId'],
|
||||
matchingFields: ['boardId', 'userId'],
|
||||
},
|
||||
deleteAttachment:{
|
||||
matchingFields: ['boardId','userId'],
|
||||
matchingFields: ['boardId', 'userId'],
|
||||
},
|
||||
addedLabel:{
|
||||
matchingFields: ['boardId', 'labelId','userId'],
|
||||
matchingFields: ['boardId', 'labelId', 'userId'],
|
||||
},
|
||||
removedLabel:{
|
||||
matchingFields: ['boardId', 'labelId','userId'],
|
||||
matchingFields: ['boardId', 'labelId', 'userId'],
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue