mirror of
https://github.com/wekan/wekan.git
synced 2026-03-06 05:40:16 +01:00
Merge pull request #3004 from slvrpdr/master
When adding a user to a board that has subtasks, also add user to the subtask board
This commit is contained in:
commit
c6afe8d007
1 changed files with 10 additions and 0 deletions
|
|
@ -814,6 +814,16 @@ if (Meteor.isServer) {
|
||||||
board.addMember(user._id);
|
board.addMember(user._id);
|
||||||
user.addInvite(boardId);
|
user.addInvite(boardId);
|
||||||
|
|
||||||
|
//Check if there is a subtasks board
|
||||||
|
if (board.subtasksDefaultBoardId){
|
||||||
|
const subBoard = Boards.findOne(board.subtasksDefaultBoardId);
|
||||||
|
//If there is, also add user to that board
|
||||||
|
if (subBoard) {
|
||||||
|
subBoard.addMember(user._id);
|
||||||
|
user.addInvite(subBoard._id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const params = {
|
const params = {
|
||||||
user: user.username,
|
user: user.username,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue