Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
This commit is contained in:
Jakob Röhrl
2020-10-16 11:42:54 +02:00
parent 083cd207af
commit caa201dc6c
2 changed files with 8 additions and 5 deletions

View File

@@ -496,10 +496,10 @@ The board list endpoint supports setting an `If-Modified-Since` header to limit
#### Request parameters
| Parameter | Type | Description |
| --------- | ------- | ---------------------------------------- |
| boardId | Integer | The id of the board the stack belongs to |
| stackId | Integer | The id of the stack |
| Parameter | Type | Description |
| --------- | ------- | ------------------------------------------------------- |
| boardId | Integer | The id of the board where the stack should be cloned to |
| stackId | Integer | The id of the stack |
#### Response
It will return an object of the new stack containing the new cards as well.

View File

@@ -398,7 +398,7 @@ class StackService {
}
$this->permissionService->checkPermission(null, $boardId, Acl::PERMISSION_MANAGE);
$this->permissionService->checkPermission(null, $boardId, Acl::PERMISSION_READ);
$this->permissionService->checkPermission(null, $id, Acl::PERMISSION_READ);
if ($this->boardService->isArchived(null, $boardId)) {
throw new StatusException('Operation not allowed. This board is archived.');
@@ -413,6 +413,9 @@ class StackService {
$newStack = new Stack();
// TODO: Currently cloing is only possible on the same board.
// If we change this and its possible to clone to other boards the 'copy' should be removed from title
$newStack->setTitle($stack->getTitle() . ' (' . $this->l10n->t('copy') . ')');
$newStack->setBoardId($boardId);
$newStack->setOrder(999);