Skip to content

feat(schemas): namespace the CRM task - #1833

Merged
rubenvdlinde merged 1 commit into
developmentfrom
feat/namespace-the-crm-task
Sep 5, 2026
Merged

feat(schemas): namespace the CRM task#1833
rubenvdlinde merged 1 commit into
developmentfrom
feat/namespace-the-crm-task

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

What

task becomes crmTask. planninq's project task is the largest of the three claimants and keeps the bare slug; dossiq's becomes caseTask.

Why all three namespace

task was claimed by planninq (30 fields), this app (18) and dossiq (14). They share description, priority and status — what any task-shaped record carries, and nothing that identifies the record.

This one is the CRM task, raised from a lead, a ticket or the KCC werkplek.

The decoys here are a vocabulary, not stray words

That makes them easier to misjudge than contract's GDPR enum, because they look like type names:

  • Activity types. ActivityTimelineService maps a source type to an activity type: 'emailLink' => 'email', 'task' => 'task'. The siblings give it away — interaction is not a schema either, it queries tickets by ticketType. The whole source-type vocabulary stays.
  • Notification subjects. NotificationService branches on $entityType === 'task' to pick task_assigned, and passes objectType: 'task' to Nextcloud's notification API. That is routing, not a schema lookup.

Both left alone. What moved: four register lists, the descriptor, TASK_SCHEMA_SLUG, SchemaMapService's entity type, the exportable schema list, and the werkplek dialog's save.

Verification

Full unit suite: 2,822 tests, 11,095 assertions, exit 0. phpcs, phpstan, psalm exit 0.

Config key stays task_schema. The repair map now carries ten renames and its test asserts all ten write, so a dropped entry fails on the count.

`task` was claimed by three apps: planninq, dossiq and this one. They share
`description`, `priority` and `status` — what any task-shaped record carries,
and nothing that identifies the record.

planninq's project task is the largest and keeps the bare slug. dossiq's becomes
`caseTask`; this is the CRM task, raised from a lead, a ticket or the KCC
werkplek.

THE DECOYS HERE ARE A VOCABULARY, NOT STRAY WORDS, which makes them easier to
misjudge than `contract`'s GDPR enum:

  - ACTIVITY TYPES. ActivityTimelineService maps a source type to an activity
    type (`'emailLink' => 'email'`, `'task' => 'task'`). The siblings give it
    away: `interaction` is not a schema either, it queries tickets by
    ticketType. The whole source-type vocabulary stays.
  - NOTIFICATION SUBJECTS. NotificationService branches on
    `$entityType === 'task'` to pick `task_assigned` and passes
    `objectType: 'task'` to Nextcloud's notification API. Routing, not a schema
    lookup.

Both left alone. The schema references moved: four register lists, the
descriptor, TASK_SCHEMA_SLUG, SchemaMapService's entity type, the exportable
schema list and the werkplek dialog's save.

Config key stays `task_schema`.

Full suite: 2,822 tests, 11,095 assertions, exit 0. phpcs, phpstan, psalm exit
0. The repair map now carries ten renames and its test asserts all ten.
@rubenvdlinde
rubenvdlinde merged commit ac29536 into development Sep 5, 2026
1 check passed
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.

1 participant