From cf4d6268ac1ef62e736d207b5b97e1d067909dc2 Mon Sep 17 00:00:00 2001 From: Niedermann IT-Dienstleistungen Date: Thu, 18 Jan 2024 12:08:10 +0100 Subject: [PATCH] fix(done): Mark card as undone when updating card As stated in https://github.com/nextcloud/deck/issues/534#issuecomment-1892061055 updating the done property of a card via the REST API (without calling the /done and /undone endpoints explicitly) does only work "one way". This commit allows setting null as new value thus allowing to mark cards as undone without an additional HTTP request but within a usual update request. Refs: #534 #4137 c3b4ed6e1fe706195176e011c6004d3a301a9458 Signed-off-by: Stefan Niedermann Signed-off-by: Niedermann IT-Dienstleistungen --- lib/Service/CardService.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Service/CardService.php b/lib/Service/CardService.php index d77cb0cea..ba644bd1a 100644 --- a/lib/Service/CardService.php +++ b/lib/Service/CardService.php @@ -355,6 +355,8 @@ public function update($id, $title, $stackId, $type, $owner, $description = '', } if ($done !== null) { $card->setDone($done->getValue()); + } else { + $card->setDone(null); }