Files
nextcloud-workflow-deck-aut…/appinfo/info.xml
T
Patrick Niebeling b4057809ed
Build package / php-lint (8.2) (push) Successful in 49s
Build package / php-lint (8.3) (push) Successful in 42s
Build package / php-lint (8.4) (push) Successful in 37s
Build package / xml-lint (push) Successful in 13s
Build package / unit-tests (push) Successful in 44s
Build package / package (push) Successful in 59s
Run Deck as the workflow owner, and drop the job interval
Workflows were being switched off with "its board no longer exists or is
no longer available to you" for boards that were perfectly intact.

Deck does not read the session for permissions. PermissionService -- the
class behind every check, including the ones inside CardService::reorder()
-- takes the current user as a plain `private ?string $userId`, filled
from the app container's `userId` service (ISession::get('user_id'),
registered shared). Pimple resolves that once per process and caches it,
and ServerContainer caches Deck's app container just as long. In cron the
value is null whenever a Deck-owned job ran earlier in the same pass, and
otherwise the first workflow owner touched -- never the user being
impersonated. null fails every check, so Deck answered NoPermissionException
for an untouched board and findStackIds() read that as "the board is gone".

IUserSession::setUser() never had any effect on this path.

- DeckIntegrationService::beginUserContext()/endUserContext() pin
  PermissionService (mandatory), CardService, BoardService and
  ActivityManager (best effort) to the workflow owner, and restore them
  afterwards. If PermissionService cannot be pinned, the runner skips that
  user instead of acting under someone else's permissions.
- findStackIds() now takes the uid as an argument and is assembled from
  pieces that cannot answer for the wrong user: BoardMapper and StackMapper
  carry no user state, and getPermissions() is handed the uid explicitly.
  It no longer goes through StackService::findAll().
- NoPermissionException is no longer treated as "board missing". Unknown
  failures throw, which leaves the workflow enabled.

This also fixes the second half of the same defect: card moves silently
failed for every user except the first one processed in a cron pass.

Separately, RunWorkflowsJob is now a plain Job instead of a TimedJob and
runs on every cron pass. The workflow_deck_automation.interval config key
is gone. Time sensitivity is no longer merely declared but structurally
unreachable: JobList::add() leaves the column at its TIME_SENSITIVE
default, and the ratchet in setLastRun() only fires for TimedJob.
2026-08-13 22:40:57 +02:00

53 lines
2.6 KiB
XML

<?xml version="1.0"?>
<info xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
<id>workflow_deck_automation</id>
<name lang="de">Deck Workflow-Automatisierung</name>
<name lang="en">Deck Workflow Automation</name>
<summary lang="de">Verschiebt überfällige Deck-Karten automatisch anhand konfigurierbarer Regeln</summary>
<summary lang="en">Automatically moves overdue Deck cards based on configurable rules</summary>
<description lang="de"><![CDATA[
Diese App erlaubt es jedem Nutzer, in den persönlichen Einstellungen eigene Automatisierungs-Workflows für die Deck-App anzulegen:
* Quell-Board und Quell-Stapel wählen
* Ziel-Stapel wählen, in den überfällige Karten verschoben werden
* optional nach zugewiesenen Benutzern filtern
* optional nach Labels/Tags filtern
* optional eine E-Mail-Benachrichtigung an sich selbst aktivieren
Ein Hintergrundjob prüft regelmäßig alle aktiven Workflows und verschiebt Karten, deren Fälligkeitsdatum überschritten wurde, ausschließlich über die internen PHP-Klassen der Deck-App (keine HTTP/OCS-Aufrufe).
]]></description>
<description lang="en"><![CDATA[
This app lets every user configure their own Deck automation workflows from Personal settings:
* pick a source board and source stack
* pick a destination stack overdue cards get moved to
* optionally filter by assigned users
* optionally filter by labels/tags
* optionally enable an email notification to themselves
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).
]]></description>
<version>0.2.0</version>
<licence>agpl</licence>
<author mail="patrick@niebel.ing">Patrick Niebeling</author>
<namespace>WorkflowDeckAutomation</namespace>
<category>organization</category>
<category>tools</category>
<bugs>https://github.com/pniebeling/workflow_deck_automation/issues</bugs>
<dependencies>
<php min-version="8.2" max-version="8.4"/>
<database min-version="9.4">pgsql</database>
<database>sqlite</database>
<database min-version="8.0">mysql</database>
<nextcloud min-version="34" max-version="34"/>
</dependencies>
<background-jobs>
<job>OCA\WorkflowDeckAutomation\BackgroundJob\RunWorkflowsJob</job>
</background-jobs>
<settings>
<personal>OCA\WorkflowDeckAutomation\Settings\Personal</personal>
<personal-section>OCA\WorkflowDeckAutomation\Settings\PersonalSection</personal-section>
</settings>
</info>