Task manager – data model, background jobs and limitations

Storage of tasks, assignees, comments and recurrences, saving and deleting, recurring instances, the weekly summary, the test endpoints and the KML and NAV task screens.

Overview

Task manager: title, description, client company, parent task, status (open, in progress, done, cancelled, blocked), priority, deadline, owner, assignees, watchers. Recurring tasks and the weekly summary run on the background job queue.

Data model

Table names carry the installation's own prefix in the database.

TableRole
tasktask (parent, company, status, priority, deadline, owner)
task_assigneeassignees and watchers with role
task_comment, task_document, task_tagcomments, documents, labels
task_recurringrecurrence template

Process

  1. Save: title 1–255 characters, owner required, deadline YYYY-MM-DD; addTask or editTask.
  2. Delete: recursively including child tasks, with assignee, comment, document, label and recurrence rows.
  3. taskrecurring (per company): from the due templates (getDueRecurringTemplates) a new instance with a period label and dynamic markers, root path and copied assignees; next run calculated, template advanced; if not expired, a new queue row; notification e-mails to the assignees via the central mailer.
  4. taskdigest (global): users with open tasks get overdue and upcoming tasks grouped by company in HTML and text, with the task list portal link; invalid addresses are skipped (logged); the next run is next Monday 05:30.

Permissions

  • Add button canAction(add); save and delete: hasPermission('modify', 'task/task'). The controller does not check the list permission (only the menu's canSee); there is no company scope.
  • companyAutocomplete, taskAutocomplete: basic access right.

Test and diagnostic endpoints

  • task.llmListModels: lists the generative models of the Gemini API (modify).
  • task.gmailTokenInfo: Gmail account token diagnostics; also prints the beginning of the key (modify).
  • task.emailProcessToTask: TEST — analyses e-mails of the installation's own Gmail folder (90 days, at most 3) with AI, returns a text report, optionally relabels and sends the report; creates no task.

KML and NAV task screens

task/kml and task/navtask are two screens with identical code. The list shows the rows of nav_task (type, company, XML, status), but the form and save would write into the framework's topic tables; the form template does not exist. Saving KML checks the modify right of the task/task route, the other actions check their own route.

Known limitations

  • The add and debug keys are not classified in the seeds.
  • The language key of the NAV task submenu is missing from the English file.