Skip to content

feat: support multiple assignees for tasks#277

Merged
pikann merged 2 commits into
masterfrom
feature/support-multiple-assignees-for-tasks
Jul 15, 2026
Merged

feat: support multiple assignees for tasks#277
pikann merged 2 commits into
masterfrom
feature/support-multiple-assignees-for-tasks

Conversation

@pikann

@pikann pikann commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Tasks can now have multiple assignees instead of exactly one. Full-stack change spanning the schema, the Go API, the MCP server, and the web UI.

Data model

  • Replaced the single tasks.assignee_id column with a task_assignees join table (task_id, member_id, assigned_at), migrated via a backfill + column drop.
  • The migration is idempotent (guarded with a DO $$ ... $$ block checking information_schema.columns) since this repo's migration runner has no applied-migrations tracking table — it re-executes every .sql file on every app startup, so a plain non-idempotent backfill/drop would fail on the second startup once the source column is already gone.

Backend (services/api)

  • Task.AssigneeID *uuid.UUIDAssigneeIDs []uuid.UUID across the domain, repository, service, DTO, and handler layers.
  • List/filter endpoints keep their existing assignee_id / assignee_ids / assignee_id=null query params; filtering matches a task if any of its assignees is in the given set.
  • CreateTask/UpdateTask accept/replace the full assignee set in one call (assignee_ids in the request body), following the same "send the full new value" convention already used for tags.
  • Assignment-changed events are published once per newly added assignee, so the notification/AI-agent trigger pipeline needed no changes.
  • Automation workflow status rules now replace a task's entire assignee set with the rule's configured member when they fire — the direct generalization of the previous single-assignee overwrite behavior.
  • Fixed two other call sites that read assignee_id directly and would otherwise have silently broken: the WASM plugin runtime's paca.tasks_list / paca.task_get host functions, and the MCP server (apps/mcp) REST client + task formatters.

Frontend (apps/web)

  • New multi-user property-field mode (chip list + checklist popover) for editing assignees in the task detail panel.
  • Task cards, table rows, and subtask rows now show an overlapping avatar stack (with a +N overflow badge) and a toggle-based picker instead of a single-select popover.
  • Board/list views grouped by assignee use each task's first assignee for its swimlane/column.

Docs

  • Updated the DBML schema, HTTP API examples, plugin SDK reference, and AI-agent docs for assignee_ids.

Known scope boundary

MCP tools (create_task / update_task) still assign one member per call — the client translates that into a single-element assignee_ids array on the wire. Multi-assign-in-one-call for AI agents was left out of scope.

Test plan

  • go build ./... && go vet ./... && go test ./... in services/api
  • PACA_E2E=1 go test ./test/e2e/... — full suite, including a new TestE2ETaskManagement_MultipleAssignees (create/get/filter/partial-update/clear) and the workflow-automation e2e tests updated for replace semantics
  • Manually replayed the migration twice against a fresh Postgres container to confirm idempotency (exact repro of the reported startup crash)
  • bun run lint && bun run tsc -b && bun run test in apps/web — 281 tests passing
  • bun run lint && npx tsc --noEmit && bun run test in apps/mcp — 605 tests passing

- Replaced the single-valued `assignee_id` column in the `tasks` table with a new `task_assignees` join table to allow multiple assignees per task.
- Updated the task creation and update services to handle multiple assignee IDs.
- Modified the task filtering logic to accommodate multiple assignees.
- Enhanced the HTTP transport layer to accept and return multiple assignee IDs in task requests and responses.
- Updated the workflow consumer to manage task assignments with multiple assignees.
- Added end-to-end tests to verify the functionality of multiple assignees in task management.
@pikann pikann linked an issue Jul 15, 2026 that may be closed by this pull request

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Assignee grouping in board/table views is inconsistent with the new multi-assignee model: a task only appears under its first assignee's column, and dragging a task onto an assignee column replaces the entire assignee set. Decide the intended board behavior before merging.

Reviewed changes — migration from single assignee_id to a task_assignees join table across the API, service layer, automations, plugins, MCP client, and web UI.

  • Migrated tasks.assignee_id to a task_assignees join table with backfill and idempotent DDL.
  • Replaced single-value assignee fields with []uuid.UUID arrays in domain models, DTOs, and responses.
  • Updated task filtering, workflow automation, and notification events to work with the new array shape.
  • Added a multi-user editor and avatar stacks for selecting/displaying multiple assignees.

ℹ️ Nitpicks

  • apps/e2e/tests/projects/interaction-views.spec.ts:88 still types createTask with assignee_id?: string; the API now expects assignee_ids, so the helper payload type should be updated to match even though no current caller uses it.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏

Comment thread apps/web/src/components/projects/interactions/view-utils.ts
@pikann pikann merged commit e8d816c into master Jul 15, 2026
9 checks passed
@pikann pikann deleted the feature/support-multiple-assignees-for-tasks branch July 15, 2026 17:14
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.

[Feature] need to assign multiple user to task

1 participant