Merge pull request #3430 from bahuma20/2797-clone-cards

Clone cards together with the board
This commit is contained in:
Julius Knorr
2025-01-02 17:08:14 +01:00
committed by GitHub
12 changed files with 406 additions and 108 deletions

View File

@@ -164,4 +164,13 @@ class BoardApiController extends ApiController {
$acl = $this->boardService->deleteAcl($aclId);
return new DataResponse($acl, HTTP::STATUS_OK);
}
/**
* @NoAdminRequired
*/
public function clone(int $boardId, bool $withCards = false, bool $withAssignments = false, bool $withLabels = false, bool $withDueDate = false, bool $moveCardsToLeftStack = false, bool $restoreArchivedCards = false): DataResponse {
return new DataResponse(
$this->boardService->clone($boardId, $this->userId, $withCards, $withAssignments, $withLabels, $withDueDate, $moveCardsToLeftStack, $restoreArchivedCards)
);
}
}

View File

@@ -135,11 +135,11 @@ class BoardController extends ApiController {
/**
* @NoAdminRequired
* @param $boardId
* @return Board
*/
public function clone($boardId) {
return $this->boardService->clone($boardId, $this->userId);
public function clone(int $boardId, bool $withCards = false, bool $withAssignments = false, bool $withLabels = false, bool $withDueDate = false, bool $moveCardsToLeftStack = false, bool $restoreArchivedCards = false): DataResponse {
return new DataResponse(
$this->boardService->clone($boardId, $this->userId, $withCards, $withAssignments, $withLabels, $withDueDate, $moveCardsToLeftStack, $restoreArchivedCards)
);
}
/**