diff --git a/appinfo/info.xml b/appinfo/info.xml index 5a2a1dc..7a4f180 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -28,7 +28,7 @@ This app lets every user configure their own Deck automation workflows from Pers A background job periodically evaluates all enabled workflows and moves cards whose due date has passed, using Deck's own internal PHP classes only (no HTTP/OCS calls). ]]> - 0.2.2 + 0.2.3 agpl Patrick Niebeling WorkflowDeckAutomation diff --git a/lib/Service/DeckIntegrationService.php b/lib/Service/DeckIntegrationService.php index 0ada754..0e9e740 100644 --- a/lib/Service/DeckIntegrationService.php +++ b/lib/Service/DeckIntegrationService.php @@ -483,7 +483,13 @@ class DeckIntegrationService { $cardService = $this->resolve(CardService::class); $cards = $cardMapper->findAllByStack($stackId); - $cards = $cardService->enrichCards($cards); + // enrichCards() mutates each $cards entry in place (labels, assigned users, ...) but + // *returns* CardDetails wrappers whose own fields (duedate, stackId, ...) were never + // copied from the wrapped card - only its overridden jsonSerialize() reads through to + // them. Capturing that return value here made every card's getDuedate()/getDaysUntilDue() + // resolve to null, so isOverdue() was always false and no workflow ever matched a card. + // Keep using the original, now-enriched $cards instead. + $cardService->enrichCards($cards); return array_values(array_filter($cards, static function (Card $card) { if (method_exists($card, 'getDeletedAt') && (int)$card->getDeletedAt() > 0) { diff --git a/package.json b/package.json index 3856c16..0554f5d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "workflow_deck_automation", - "version": "0.2.2", + "version": "0.2.3", "private": true, "type": "module", "description": "Automates moving overdue Deck cards between stacks, configurable per user.",