Build package / php-lint (8.4) (push) Successful in 1m33s
Build package / php-lint (8.5) (push) Successful in 49s
Build package / xml-lint (push) Successful in 13s
Build package / unit-tests (push) Successful in 38s
Build package / package (push) Successful in 1m44s
Workflows now move every overdue card of their source stack. A new migration drops filter_user_ids and filter_label_ids; workflows that had a filter keep running unfiltered. The version goes to 35.1.0 so the migration runs on update. Removed along with the filters: the labels and participants endpoints and their Deck lookups, the dead-filter warnings and markers, and CardService::enrichCards() in the card read. enrichCards() only added labels, assignees and comment counts, and ran a permission check against Deck's frozen uid.
64 lines
1.9 KiB
PHP
64 lines
1.9 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace OCA\WorkflowDeckAutomation\Db;
|
|
|
|
use OCP\AppFramework\Db\Entity;
|
|
use OCP\DB\Types;
|
|
|
|
/**
|
|
* @method string getUserId()
|
|
* @method void setUserId(string $userId)
|
|
* @method string getTitle()
|
|
* @method void setTitle(string $title)
|
|
* @method int getBoardId()
|
|
* @method void setBoardId(int $boardId)
|
|
* @method int getSourceStackId()
|
|
* @method void setSourceStackId(int $sourceStackId)
|
|
* @method int getTargetStackId()
|
|
* @method void setTargetStackId(int $targetStackId)
|
|
* @method bool getNotifyEmail()
|
|
* @method void setNotifyEmail(bool $notifyEmail)
|
|
* @method bool getEnabled()
|
|
* @method void setEnabled(bool $enabled)
|
|
* @method \DateTime|null getLastRun()
|
|
* @method void setLastRun(?\DateTime $lastRun)
|
|
*/
|
|
class Workflow extends Entity implements \JsonSerializable {
|
|
protected $userId;
|
|
protected $title;
|
|
protected $boardId;
|
|
protected $sourceStackId;
|
|
protected $targetStackId;
|
|
protected $notifyEmail;
|
|
protected $enabled;
|
|
protected $lastRun;
|
|
|
|
public function __construct() {
|
|
$this->addType('id', Types::INTEGER);
|
|
$this->addType('userId', Types::STRING);
|
|
$this->addType('title', Types::STRING);
|
|
$this->addType('boardId', Types::INTEGER);
|
|
$this->addType('sourceStackId', Types::INTEGER);
|
|
$this->addType('targetStackId', Types::INTEGER);
|
|
$this->addType('notifyEmail', Types::BOOLEAN);
|
|
$this->addType('enabled', Types::BOOLEAN);
|
|
$this->addType('lastRun', Types::DATETIME);
|
|
}
|
|
|
|
public function jsonSerialize(): array {
|
|
return [
|
|
'id' => $this->getId(),
|
|
'userId' => $this->getUserId(),
|
|
'title' => $this->getTitle(),
|
|
'boardId' => $this->getBoardId(),
|
|
'sourceStackId' => $this->getSourceStackId(),
|
|
'targetStackId' => $this->getTargetStackId(),
|
|
'notifyEmail' => (bool)$this->getNotifyEmail(),
|
|
'enabled' => (bool)$this->getEnabled(),
|
|
'lastRun' => $this->getLastRun()?->format(\DateTimeInterface::ATOM),
|
|
];
|
|
}
|
|
}
|