Implement done state for due dates

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-11-05 16:24:02 +01:00
parent a777169487
commit d7b64ea17d
7 changed files with 114 additions and 21 deletions

View File

@@ -261,7 +261,7 @@ class CardService {
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
* @throws BadRequestException
*/
public function update($id, $title, $stackId, $type, $order = 0, $description = '', $owner, $duedate = null, $deletedAt = null, $archived = null) {
public function update($id, $title, $stackId, $type, $order = 0, $description = '', $owner, $duedate = null, ?int $deletedAt = null, ?bool $archived = null, ?bool $dueDone = null) {
if (is_numeric($id) === false) {
throw new BadRequestException('card id must be a number');
}
@@ -320,6 +320,9 @@ class CardService {
if ($archived !== null) {
$card->setArchived($archived);
}
if ($dueDone !== null) {
$card->setDueDone($dueDone);
}
// Trigger update events before setting description as it is handled separately
@@ -590,7 +593,7 @@ class CardService {
*/
public function findAllWithDue($userId) {
$cards = $this->cardMapper->findAllWithDue($userId);
return $cards;
}
@@ -602,7 +605,7 @@ class CardService {
*/
public function findAssignedCards($userId) {
$cards = $this->cardMapper->findAssignedCards($userId);
return $cards;
}
}