cards soft delete wip

Signed-off-by: Manuel Arno Korfmann <manu@korfmann.info>

cards: softdelete done; undo delete wip

Signed-off-by: Manuel Arno Korfmann <manu@korfmann.info>

show deleted cards in board settings sidebar wip

Signed-off-by: Manuel Arno Korfmann <manu@korfmann.info>

CardMapper#findDeleted: fix bug in entity property assigning

Signed-off-by: Manuel Arno Korfmann <manu@korfmann.info>
This commit is contained in:
Manuel Arno Korfmann
2018-07-09 23:49:42 +02:00
committed by Julius Härtl
parent 3e4dedf397
commit 2ef4b55af4
10 changed files with 88 additions and 2 deletions

View File

@@ -56,6 +56,10 @@ class CardService {
$this->currentUser = $userId;
}
public function fetchDeleted($boardId) {
return $this->cardMapper->findDeleted($boardId);
}
public function find($cardId) {
$this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_READ);
$card = $this->cardMapper->find($cardId);
@@ -89,7 +93,10 @@ class CardService {
if ($this->boardService->isArchived($this->cardMapper, $id)) {
throw new StatusException('Operation not allowed. This board is archived.');
}
return $this->cardMapper->delete($this->cardMapper->find($id));
$card = $this->cardMapper->find($id);
$card->setDeletedAt(time());
$this->cardMapper->update($card);
return $card;
}
public function update($id, $title, $stackId, $type, $order, $description, $owner, $duedate) {