From 5851c4a5f128434157ea61a941377a8d90030d99 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 13 Oct 2022 12:29:41 +0200 Subject: [PATCH] Fix sorting stacks Signed-off-by: Joas Schilling --- lib/Service/StackService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Service/StackService.php b/lib/Service/StackService.php index d15544a1c..1e8bfc567 100644 --- a/lib/Service/StackService.php +++ b/lib/Service/StackService.php @@ -352,6 +352,7 @@ class StackService { $this->permissionService->checkPermission($this->stackMapper, $id, Acl::PERMISSION_MANAGE); $stackToSort = $this->stackMapper->find($id); $stacks = $this->stackMapper->findAll($stackToSort->getBoardId()); + usort($stacks, static fn (Stack $stackA, Stack $stackB) => $stackA->getOrder() - $stackB->getOrder()); $result = []; $i = 0; foreach ($stacks as $stack) {