From e16f60f107f3c56b53ba80ca300718e0bc287efc Mon Sep 17 00:00:00 2001 From: Jonas Date: Tue, 29 Sep 2026 16:17:42 +0200 Subject: [PATCH] fix(cards): assign lables and users when creating a card via OCS The OCS card create endpoint took `labels` and `users` but never applied them, because the assignment loops were commented out in commit 972c797f5b. Fixes: #8460 Signed-off-by: Jonas Assisted-by: ClaudeCode:claude-opus-5.5 --- lib/Controller/CardOcsController.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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); }