Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz Source: /opt/alga-psa on psa.joliet.tech
4.4 KiB
4.4 KiB
Workflow Ticket Assignment Model
Problem
The workflow ticket actions currently expose multiple overlapping assignment concepts:
tickets.create.assigned_totickets.create.assigneetickets.update_fields.patch.assigned_totickets.assign.assignee
This is confusing in the workflow editor, makes team-aware assignment inconsistent across actions, and does not provide a clean way to manage additional ticket assignees (ticket_resources) through workflows.
Goals
- Replace the legacy ticket workflow assignment fields with one canonical assignment model.
- Make the workflow editor render assignment pickers consistently, including nested picker-backed fields.
- Support additional assigned MSP users in workflow actions.
- Make assignment updates deterministic and idempotent.
- Keep team assignment semantics intuitive:
- primary assignee resolved from the chosen team/queue/user
- team members unioned with explicit additional users
- duplicates removed
- primary assignee never duplicated as an additional assignee
Non-goals
- Preserving backwards compatibility for old workflow assignment schemas.
- Adding a broader assignment abstraction for non-ticket workflow actions in this change.
- Redesigning ticket assignment behavior outside workflow actions.
Canonical assignment model
All ticket workflow actions should use:
assignment: {
primary: {
type: 'user' | 'team' | 'queue',
id: string
} | null,
additional_user_ids: string[]
}
Action-specific requirements
tickets.create
- Remove
assigned_toandassignee. - Add top-level
assignment. assignment.primarymay be null.- If
assignment.primaryis null,additional_user_idsmust be empty. - Persist
assignment.primarytotickets.assigned_to/tickets.assigned_team_idas appropriate. - Persist
additional_user_idstoticket_resources.
tickets.update_fields
- Remove
patch.assigned_to. - Add
patch.assignment. patch.assignmentis atomic replacement of workflow-visible assignment state.- If present, it replaces both the primary assignment and the additional-user set.
tickets.assign
- Remove legacy
assigneeinput. - Add top-level
assignment. assignment.primaryis required.- Team/queue assignment keeps current primary-resolution behavior, but now also supports explicit
additional_user_ids. - Final additional-user set = team/queue expansion union explicit
additional_user_ids, minus the primary assignee.
Validation rules
- All referenced users must exist in the tenant and be active internal MSP users.
- Team primary assignment must resolve to a valid active lead.
- Queue primary assignment must resolve according to current queue behavior.
additional_user_idsis replace-only and fully deterministic.- Duplicates are removed.
- The resolved primary assignee is removed from the final additional-user set.
Workflow editor requirements
- Nested picker metadata must survive schema resolution for nullable/object-backed fields.
assignment.primary.typerenders as a fixed enum/select field.assignment.primary.idrenders as a picker that depends onassignment.primary.type.assignment.additional_user_idsrenders as a multi-user picker.- The update-fields patch editor must support
patch.assignmentas structured input, not raw JSON-only authoring.
Technical design
- Add shared assignment schema builders/helpers in
shared/workflow/runtime/actions/businessOperations/tickets.ts. - Add one shared assignment resolver for workflow ticket actions.
- Add one shared ticket-resource reconciliation helper for workflow ticket actions.
- Update workflow editor field extraction/resolution so
x-workflow-picker-*metadata is preserved whenanyOfnullable wrappers are unwrapped. - Extend the fixed-value workflow input editor to support multi-user picker editing for array fields.
Acceptance criteria
- No ticket workflow action input schema contains the legacy create/update/assign assignment fields.
- The workflow editor shows assignment pickers for the new model.
tickets.create,tickets.update_fields, andtickets.assignall persist assignment state through the same canonical resolution rules.- Additional assigned users are supported and reconciled deterministically.
- Team assignment plus explicit additional users uses union semantics.
- The resolved primary assignee is never duplicated into
ticket_resources.