mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
Merge branch 'devel' of https://github.com/andresmanelli/wekan into devel
This commit is contained in:
commit
334c15ff71
4 changed files with 17 additions and 4 deletions
|
@ -117,6 +117,9 @@ if (Meteor.isServer) {
|
|||
params.url = card.absoluteUrl();
|
||||
params.cardId = activity.cardId;
|
||||
}
|
||||
if (activity.swimlaneId) {
|
||||
params.swimlaneId = activity.swimlaneId;
|
||||
}
|
||||
if (activity.commentId) {
|
||||
const comment = activity.comment();
|
||||
params.comment = comment.text;
|
||||
|
|
|
@ -855,10 +855,15 @@ if (Meteor.isServer) {
|
|||
permission: req.body.permission || 'private',
|
||||
color: req.body.color || 'belize',
|
||||
});
|
||||
const swimlaneId = Swimlanes.insert({
|
||||
title: TAPi18n.__('default'),
|
||||
boardId: id,
|
||||
});
|
||||
JsonRoutes.sendResult(res, {
|
||||
code: 200,
|
||||
data: {
|
||||
_id: id,
|
||||
defaultSwimlaneId: swimlaneId,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -914,8 +914,9 @@ Cards.mutations({
|
|||
|
||||
//FUNCTIONS FOR creation of Activities
|
||||
|
||||
function cardMove(userId, doc, fieldNames, oldListId) {
|
||||
if (_.contains(fieldNames, 'listId') && doc.listId !== oldListId) {
|
||||
function cardMove(userId, doc, fieldNames, oldListId, oldSwimlaneId) {
|
||||
if ((_.contains(fieldNames, 'listId') && doc.listId !== oldListId) ||
|
||||
(_.contains(fieldNames, 'swimlaneId') && doc.swimlaneId !== oldSwimlaneId)){
|
||||
Activities.insert({
|
||||
userId,
|
||||
oldListId,
|
||||
|
@ -923,6 +924,8 @@ function cardMove(userId, doc, fieldNames, oldListId) {
|
|||
listId: doc.listId,
|
||||
boardId: doc.boardId,
|
||||
cardId: doc._id,
|
||||
swimlaneId: doc.swimlaneId,
|
||||
oldSwimlaneId,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -990,6 +993,7 @@ function cardCreation(userId, doc) {
|
|||
boardId: doc.boardId,
|
||||
listId: doc.listId,
|
||||
cardId: doc._id,
|
||||
swimlaneId: doc.swimlaneId,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1037,7 +1041,8 @@ if (Meteor.isServer) {
|
|||
//New activity for card moves
|
||||
Cards.after.update(function (userId, doc, fieldNames) {
|
||||
const oldListId = this.previous.listId;
|
||||
cardMove(userId, doc, fieldNames, oldListId);
|
||||
const oldSwimlaneId = this.previous.swimlaneId;
|
||||
cardMove(userId, doc, fieldNames, oldListId, oldSwimlaneId);
|
||||
});
|
||||
|
||||
// Add a new activity if we add or remove a member to the card
|
||||
|
|
|
@ -8,7 +8,7 @@ const postCatchError = Meteor.wrapAsync((url, options, resolve) => {
|
|||
});
|
||||
});
|
||||
|
||||
const webhooksAtbts = ( (process.env.WEBHOOKS_ATTRIBUTES && process.env.WEBHOOKS_ATTRIBUTES.split(',') ) || ['cardId', 'listId', 'oldListId', 'boardId', 'comment', 'user', 'card', 'commentId']);
|
||||
const webhooksAtbts = ( (process.env.WEBHOOKS_ATTRIBUTES && process.env.WEBHOOKS_ATTRIBUTES.split(',') ) || ['cardId', 'listId', 'oldListId', 'boardId', 'comment', 'user', 'card', 'commentId', 'swimlaneId']);
|
||||
|
||||
Meteor.methods({
|
||||
outgoingWebhooks(integrations, description, params) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue