Notify board members about moved cards according to their Deck setting
Build package / unit-tests (push) Failing after 20s
Build package / xml-lint (push) Successful in 46s
Build package / php-lint (8.4) (push) Successful in 1m30s
Build package / php-lint (8.5) (push) Successful in 1m36s
Build package / package (push) Skipped

Replaces the yes/no notify_email flag with notify_mode:
- off:   no mail
- owner: only the board owner, as before (migrated from notify_email=1)
- board: everyone with access to the board, filtered by their own Deck
         "Notifications" setting for it (board:<id>:notify-due: off /
         assigned / all), mirroring Deck's NotificationHelper rules

Recipients are resolved via PermissionService::findUsers() (owner, ACL,
groups and circles expanded), AssignmentMapper::isUserAssigned() and
IConfig, none of which reads Deck's frozen $userId. If they cannot be
resolved, no mail is sent rather than one to the wrong people.

Moved cards are collected over the whole run and each recipient gets a
single digest mail afterwards, in their own language.

Bumps to 35.2.0 so the migrations run.
This commit is contained in:
Patrick Niebeling committed 2026-09-30 10:31:45 +02:00
1 parent 27717205cd
commit 578b235f08
14 files changed
+579 -100

No files matched your search

+5 -5
View File
@@ -18,8 +18,8 @@ use OCP\DB\Types;
* @method void setSourceStackId(int $sourceStackId)
* @method int getTargetStackId()
* @method void setTargetStackId(int $targetStackId)
* @method bool getNotifyEmail()
* @method void setNotifyEmail(bool $notifyEmail)
* @method string getNotifyMode()
* @method void setNotifyMode(string $notifyMode)
* @method bool getEnabled()
* @method void setEnabled(bool $enabled)
* @method \DateTime|null getLastRun()
@@ -31,7 +31,7 @@ class Workflow extends Entity implements \JsonSerializable {
protected $boardId;
protected $sourceStackId;
protected $targetStackId;
protected $notifyEmail;
protected $notifyMode;
protected $enabled;
protected $lastRun;
@@ -42,7 +42,7 @@ class Workflow extends Entity implements \JsonSerializable {
$this->addType('boardId', Types::INTEGER);
$this->addType('sourceStackId', Types::INTEGER);
$this->addType('targetStackId', Types::INTEGER);
$this->addType('notifyEmail', Types::BOOLEAN);
$this->addType('notifyMode', Types::STRING);
$this->addType('enabled', Types::BOOLEAN);
$this->addType('lastRun', Types::DATETIME);
}
@@ -55,7 +55,7 @@ class Workflow extends Entity implements \JsonSerializable {
'boardId' => $this->getBoardId(),
'sourceStackId' => $this->getSourceStackId(),
'targetStackId' => $this->getTargetStackId(),
'notifyEmail' => (bool)$this->getNotifyEmail(),
'notifyMode' => (string)$this->getNotifyMode(),
'enabled' => (bool)$this->getEnabled(),
'lastRun' => $this->getLastRun()?->format(\DateTimeInterface::ATOM),
];