From 3bcd36df41ce7f4306be81afe3281e25b51a4700 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 62e332432..867af26f0 100644 --- a/lib/Controller/CardOcsController.php +++ b/lib/Controller/CardOcsController.php @@ -50,13 +50,13 @@ public function create(string $title, int $stackId, ?int $boardId = null, ?strin } $card = $this->cardService->create($title, $stackId, $type, $order, $owner, $description, $duedate, $startdate, $color); - // 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); }