mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Added restore swimlane and swimlane title to webhooks
This commit is contained in:
parent
1dd97ebd49
commit
832bd6187c
1 changed files with 28 additions and 3 deletions
|
|
@ -371,14 +371,39 @@ if (Meteor.isServer) {
|
|||
});
|
||||
});
|
||||
|
||||
Swimlanes.after.update((userId, doc) => {
|
||||
if (doc.archived) {
|
||||
Swimlanes.after.update((userId, doc, fieldNames) => {
|
||||
if (fieldNames.includes('title')) {
|
||||
Activities.insert({
|
||||
userId,
|
||||
type: 'swimlane',
|
||||
activityType: 'changedSwimlaneTitle',
|
||||
listId: doc._id,
|
||||
boardId: doc.boardId,
|
||||
// this preserves the name so that the activity can be useful after the
|
||||
// list is deleted
|
||||
title: doc.title,
|
||||
});
|
||||
} else if (doc.archived) {
|
||||
Activities.insert({
|
||||
userId,
|
||||
type: 'swimlane',
|
||||
activityType: 'archivedSwimlane',
|
||||
swimlaneId: doc._id,
|
||||
listId: doc._id,
|
||||
boardId: doc.boardId,
|
||||
// this preserves the name so that the activity can be useful after the
|
||||
// list is deleted
|
||||
title: doc.title,
|
||||
});
|
||||
} else if (fieldNames.includes('archived')) {
|
||||
Activities.insert({
|
||||
userId,
|
||||
type: 'swimlane',
|
||||
activityType: 'restoredSwimlane',
|
||||
listId: doc._id,
|
||||
boardId: doc.boardId,
|
||||
// this preserves the name so that the activity can be useful after the
|
||||
// list is deleted
|
||||
title: doc.title,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue