Assign User to Content
This document describes how the Assign feature works in Kanban Workspaces and how to test it.
How It Works
Overview
The Assign feature lets you assign a backend user to a workspace content element (a card on the kanban board). You can add an optional title and description for the assignment. The assignment is stored in the extension’s own table and is shown on the card (including assignee avatar when available). When you assign a different user (not yourself), that user receives an email notification. When the record is published, assignment data for that record is cleaned up automatically.
Flow
- Assign
You open the card context menu (⋯) and choose **Assign**.
A modal opens with:
**Title** (optional)
Description (optional)
**Assignee** (required) – select a backend user from the dropdown (populated from ``be_users``).
You click OK.
The extension sends the data to its own Ajax endpoint and saves one row in the table `sys_workspaces_assignee` (per record/workspace/assignee).
If the assignee is not the current user and has a valid email, an assignment notification email is sent (subject and body from Fluid templates).
The modal closes, a success message is shown, and the board refreshes.
After refresh, the card shows the assignee (avatar image or initial) in the card footer, using data enriched from
sys_andworkspaces_ assignee be_.users - Display When the board loads (or refreshes), workspace data is enriched with assignee info from `sys_workspaces_assignee` and `be_users` (including avatar URL from FAL when the backend user has an avatar). Each card that has an assignee shows it in the footer (avatar image if available, otherwise user initial).
- Email notification
When you assign another backend user (with a valid email), the extension sends one email per assignment using TYPO3’s mailer and Fluid email templates.
The email uses the SystemEmail layout and the extension’s templates under
EXT:kanban_workspaces/Resources/Private/Templates/Email/(e.g. AssignmentNotification). * Sender and format can be overridden via Page TSconfigtx_workspaces.emails.*; otherwise globalMAILdefaults (e.g.defaultMailFromAddress) apply. - Publish
When a record is **published** (via TYPO3 workspace publish), the extension listens to the core event `AfterRecordPublishedEvent`.
It then deletes all rows in
sys_for that table, record UID, and workspace. * So assignments are only kept for draft/workspace content; they are not kept after publish.workspaces_ assignee
Technical Summary
- Storage: Table
sys_(extension-owned). Optional TCA columnworkspaces_ assignee t3ver_on versioned tables points to the assignee mapping row; no core schema is changed beyond that.assignee - UI: Assign is in the card context menu (⋯ → Assign). Assign modal uses TYPO3 backend Modal with assignee dropdown; assignee is shown on the card with
.card-/assignees .user-(avatar image or initial).avatar - Backend: Ajax route
kanban_(pathworkspace_ assign /kanban-workspace/assign) →Assign; serviceAjax Controller:: assign Action Assigneefor persist and cleanup;Mapping Service Assignmentfor sending the assignee email;Notification Service Assigneefor cleanup on publish;Cleanup After Publish Listener Assigneeto add assignee (and assignee avatar URL) to workspace data for display.Enrichment Listener - Email:
AssignmentusesNotification Service Mailer, FluidEmail, and templatesInterface AssignmentNotification.html/AssignmentNotification.txt; fallback MAIL template/layout paths ensure the SystemEmail layout is found even when global MAIL config overwrites defaults.
How to Test
Prerequisites
- TYPO3 with EXT:workspaces and EXT:kanban_workspaces installed and the database schema applied (so
sys_exists).workspaces_ assignee - Backend user logged in, with access to the Kanban Workspaces module.
- Non-Live workspace – e.g. create or switch to a workspace (not “Live”).
- Content in workspace – at least one page or content element that has a version in that workspace (so it appears as a card on the board).
Apply Database Schema (if needed)
If the table does not exist yet:
- Option A: Install Tool → Compare database → apply changes so that
sys_is created fromworkspaces_ assignee ext_.tables. sql - Option B: If you use CLI: run your project’s database compare/sync command so that the extension’s schema is applied.
Get a Backend User UID
You need a valid backend user UID for the “Assignee” field:
- In the TYPO3 backend, go to Admin Tools → Backend Users (or your user list), open a user and note the UID (e.g. 1, 2, 3).
- Or query the database:
SELECT uid, username FROM be_users WHERE uid > 0;
Test 1: Assign a user to a card
- Switch to a non-Live workspace.
- In the backend, go to Web → Kanban Workspaces.
- Select a page in the page tree that has workspace content (so at least one card is visible).
- Find a card on the board.
- Open the card context menu (click the ⋯ “more” button on the card).
- Click Assign.
- In the modal: **Title:** e.g. “Review requested” Description: e.g. “Please check by Friday” * Assignee (Backend user UID): enter a valid backend user UID (e.g. 1).
- Click OK.
- Expected: Modal closes. A success notification (e.g. “Assignment saved”) appears. * The board refreshes; the card shows the assignee in the footer (e.g. avatar with initial or “U1”).
- Optional: Open the same module again (or refresh the page). The same card should still show the assignee (data comes from
sys_+ enrichment).workspaces_ assignee
Test 2: Change assignee / title / description
- On the same card, open the context menu again and choose Assign.
- Change: **Assignee** to another backend user UID, or Title or Description.
- Click OK.
- Expected: Success message, board refresh, and the card shows the new assignee (and the stored title/description are updated in
sys_).workspaces_ assignee
Test 3: Validation (invalid assignee)
- Open Assign on any card.
- Leave Assignee empty or enter 0 or a non-existent UID.
- Click OK.
- Expected: Either validation prevents submit, or you see an error message and the modal may close without saving. No new/updated row in
sys_for invalid data.workspaces_ assignee
Test 4: Cleanup on publish
- Note a card that has an assignee (e.g. table, UID, workspace).
- Publish that record using TYPO3’s normal workspace publish (e.g. from the Workspaces list module or the action that publishes that version).
- Expected:
The record is published as usual.
Rows in
sys_for that table, record_uid, and workspace_id are removed by the extension’s listener.workspaces_ assignee -
Verify: In the database, run:
SELECT * FROM sys_workspaces_assignee WHERE table_name = '<table>' AND record_uid = <uid> AND workspace_id = <workspace_id>;Copied!There should be no rows for that combination after publish.
Test 5: Assignee visible after full reload
- Assign a user to a card (Test 1).
- Reload the Kanban Workspaces page (F5) or close and reopen Web → Kanban Workspaces.
- Select the same page in the page tree.
- Expected: The card still shows the assignee in the footer (enrichment from
sys_+workspaces_ assignee be_).users
Troubleshooting
- “Assign URL not configured”
-
- The Ajax route for assign is not available. Clear backend cache (Admin Tools → Flush TYPO3 and PHP cache). Ensure the extension is active and that no other extension overrides or disables the route.
- Assignee not shown on card after assign
-
- Board should refresh automatically. If not, reload the page. If assignee still does not appear, check that
Assigneeis registered forEnrichment Listener Afterand thatData Generated For Workspace Event sys_has a row for that record/workspace/assignee.workspaces_ assignee
- Board should refresh automatically. If not, reload the page. If assignee still does not appear, check that
- Assign modal does not open
-
- Check the browser console for JavaScript errors. Ensure no other script overrides the card menu or modal behavior.
- Table sys_workspaces_assignee does not exist
-
- Run database compare from the Install Tool (or your schema sync) so that the extension’s
ext_is applied.tables. sql
- Run database compare from the Install Tool (or your schema sync) so that the extension’s
- Cleanup on publish does not run
-
- Ensure
Assigneeis registered forCleanup After Publish Listener After. Clear caches and try publishing again.Record Published Event
- Ensure
- Email not sent after assign
-
- Ensure the assignee is not the current user and has a valid email in the backend user record.
- Configure
MAILin your TYPO3 config (e.g.defaultMailFromAddress,transport). See Configuration (MAIL configuration). - Check TYPO3 logs (e.g.
var/log/typo3_*.log) for transport or template errors; the extension logs when email is skipped or fails.
See Also
- Index – general Kanban Workspaces usage
- Configuration – module and extension configuration (including MAIL for assignment emails)
- Developer – implementation details (controllers, services, listeners)