Skip to content

feat: daily reminder mail for erroneous tasks (admins + WF owners, per-user opt-out)#39

Open
JeJan wants to merge 1 commit into
mainfrom
feat/erroneous-task-reminder
Open

feat: daily reminder mail for erroneous tasks (admins + WF owners, per-user opt-out)#39
JeJan wants to merge 1 commit into
mainfrom
feat/erroneous-task-reminder

Conversation

@JeJan

@JeJan JeJan commented Jul 7, 2026

Copy link
Copy Markdown

What

Daily e-mail digest of all workflow tasks in an error state (see ADR-009):

  • Admins (role wf-admin + EMAIL_RECEIVERS_ERRONEOUS_TASKS) receive a global overview across all workflows; WF owners (BPMN property wf-owner) only receive the errors of their own workflows. Users who are both get the admin mail only.
  • Errors that are new since the last digest are marked with * NEW *; each entry shows since when the task has been erroneous (new column error_at).
  • Per-user opt-out via the user settings (new switch, default: on). The static receiver list is exempt from the opt-out.
  • No mail is sent when there is nothing to report (for the respective recipient); tasks of cancelled/completed instances are no longer reported.

Configuration

  • EMAIL_ERRONEOUS_TASKS_REMINDER_CRON (default 0 7 * * *, empty = disabled; invalid expressions are logged and disable only this job)
  • EMAIL_RECEIVERS_ERRONEOUS_TASKS (existing list, always receives the global digest)

Migration

e8b3d5c7a9f1: workflow_instance_tasks.error_at + error_reported_at, workflow_users.receive_error_task_reminder (default on). Runs on app startup as usual.

Tests

10 new tests (test_erroneous_reminder.py): new/known cycle, recovery reset, owner scoping, admin dedup, opt-out incl. static-list exemption, partial send failures, cancelled instances. Full backend suite green, frontend typecheck green. Verified end-to-end against a local SMTP catcher (Mailpit).

Note

The migration shares its parent (d4f7a1e9c2b6) with the one from the form-template PR — whoever merges second must rebase their migration or create an Alembic merge revision.

@JeJan JeJan changed the title feat: tägliche Reminder-Mail für fehlerhafte Aufgaben (Admins + WF-Owner, Opt-out je Benutzer) feat: daily reminder mail for erroneous tasks (admins + WF owners, per-user opt-out) Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants