Fix sorting stacks

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling
2022-10-13 12:29:41 +02:00
committed by Julius Härtl
parent bc070cbeb9
commit 982df96c3c

View File

@@ -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) {