diff --git a/lib/Controller/CardOcsController.php b/lib/Controller/CardOcsController.php index efc52d29c..6dbdb2813 100644 --- a/lib/Controller/CardOcsController.php +++ b/lib/Controller/CardOcsController.php @@ -57,13 +57,13 @@ public function create(string $title, int $stackId, ?int $boardId = null, ?strin // An explicit order means the client wants the card at that position, so shift the surrounding cards $card = $this->cardService->create($title, $stackId, $type, $order, $owner, $description, $duedate, $startdate, $color, insertAtPosition: $order !== self::DEFAULT_ORDER); - // foreach ($labels as $label) { - // $this->assignLabel($card->getId(), $label); - // } + foreach ($labels ?? [] as $label) { + $this->assignLabel($boardId, $card->getId(), $label); + } - // foreach ($users as $user) { - // $this->assignmentService->assignUser($card->getId(), $user['id'], $user['type']); - // } + foreach ($users ?? [] as $user) { + $this->assignmentService->assignUser($card->getId(), $user['id'], $user['type']); + } return new DataResponse($card); }