mirror of
https://github.com/wekan/wekan.git
synced 2025-12-21 09:50:13 +01:00
Added change board title to available webhooks
This commit is contained in:
parent
832bd6187c
commit
67835e3421
2 changed files with 13 additions and 3 deletions
|
|
@ -368,7 +368,7 @@ services:
|
||||||
#-----------------------------------------------------------------
|
#-----------------------------------------------------------------
|
||||||
# ==== OUTGOING WEBHOOKS ====
|
# ==== OUTGOING WEBHOOKS ====
|
||||||
# What to send to Outgoing Webhook, or leave out. If commented out the default values will be: cardId,listId,oldListId,boardId,comment,user,card,commentId,swimlaneId,customerField,customFieldValue
|
# What to send to Outgoing Webhook, or leave out. If commented out the default values will be: cardId,listId,oldListId,boardId,comment,user,card,commentId,swimlaneId,customerField,customFieldValue
|
||||||
#- WEBHOOKS_ATTRIBUTES=cardId,listId,oldListId,boardId,comment,user,card,commentId
|
#- WEBHOOKS_ATTRIBUTES=cardId,listId,oldListId,boardId,comment,user,card,board,list,swimlane,commentId
|
||||||
#-----------------------------------------------------------------
|
#-----------------------------------------------------------------
|
||||||
# ==== Debug OIDC OAuth2 etc ====
|
# ==== Debug OIDC OAuth2 etc ====
|
||||||
#- DEBUG=true
|
#- DEBUG=true
|
||||||
|
|
|
||||||
|
|
@ -1845,7 +1845,6 @@ if (Meteor.isServer) {
|
||||||
if (!_.contains(fieldNames, 'members')) {
|
if (!_.contains(fieldNames, 'members')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (modifier.$set) {
|
if (modifier.$set) {
|
||||||
const boardId = doc._id;
|
const boardId = doc._id;
|
||||||
foreachRemovedMember(doc, modifier.$set, memberId => {
|
foreachRemovedMember(doc, modifier.$set, memberId => {
|
||||||
|
|
@ -1899,10 +1898,21 @@ if (Meteor.isServer) {
|
||||||
|
|
||||||
// Add a new activity if we add or remove a member to the board
|
// Add a new activity if we add or remove a member to the board
|
||||||
Boards.after.update((userId, doc, fieldNames, modifier) => {
|
Boards.after.update((userId, doc, fieldNames, modifier) => {
|
||||||
|
console.log('board',doc)
|
||||||
|
if (fieldNames.includes('title')) {
|
||||||
|
Activities.insert({
|
||||||
|
userId,
|
||||||
|
type: 'board',
|
||||||
|
activityType: 'changedBoardTitle',
|
||||||
|
boardId: doc._id,
|
||||||
|
// this preserves the name so that the activity can be useful after the
|
||||||
|
// list is deleted
|
||||||
|
title: doc.title,
|
||||||
|
});
|
||||||
|
}
|
||||||
if (!_.contains(fieldNames, 'members')) {
|
if (!_.contains(fieldNames, 'members')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Say hello to the new member
|
// Say hello to the new member
|
||||||
if (modifier.$push && modifier.$push.members) {
|
if (modifier.$push && modifier.$push.members) {
|
||||||
const memberId = modifier.$push.members.userId;
|
const memberId = modifier.$push.members.userId;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue