A task instance within a project. Copies description and duration from the task template at creation time — editable independently.
Tracks who completed the task via completed_by_uuid + completed_at.
Summary
Functions
Form-facing changeset. Does NOT allow setting completed_by_uuid or
completed_at — those are server-owned fields (use status_changeset/2).
Server-trusted changeset that also allows setting completion fields.
Use from context functions that own the completion transition, e.g.
progress updates, explicit complete_assignment/2, or reopen_assignment/1.
Types
@type t() :: %PhoenixKitProjects.Schemas.Assignment{ __meta__: term(), assigned_department: struct() | Ecto.Association.NotLoaded.t() | nil, assigned_department_uuid: UUIDv7.t() | nil, assigned_person: struct() | Ecto.Association.NotLoaded.t() | nil, assigned_person_uuid: UUIDv7.t() | nil, assigned_team: struct() | Ecto.Association.NotLoaded.t() | nil, assigned_team_uuid: UUIDv7.t() | nil, completed_at: DateTime.t() | nil, completed_by: PhoenixKit.Users.Auth.User.t() | Ecto.Association.NotLoaded.t() | nil, completed_by_uuid: UUIDv7.t() | nil, counts_weekends: boolean() | nil, dependencies: [PhoenixKitProjects.Schemas.Dependency.t()] | Ecto.Association.NotLoaded.t(), dependents: term(), description: String.t() | nil, estimated_duration: integer() | nil, estimated_duration_unit: String.t() | nil, inserted_at: DateTime.t() | nil, position: integer() | nil, progress_pct: integer() | nil, project: PhoenixKitProjects.Schemas.Project.t() | Ecto.Association.NotLoaded.t() | nil, project_uuid: UUIDv7.t() | nil, status: String.t() | nil, task: PhoenixKitProjects.Schemas.Task.t() | Ecto.Association.NotLoaded.t() | nil, task_uuid: UUIDv7.t() | nil, track_progress: boolean() | nil, updated_at: DateTime.t() | nil, uuid: UUIDv7.t() | nil }
Functions
Form-facing changeset. Does NOT allow setting completed_by_uuid or
completed_at — those are server-owned fields (use status_changeset/2).
Server-trusted changeset that also allows setting completion fields.
Use from context functions that own the completion transition, e.g.
progress updates, explicit complete_assignment/2, or reopen_assignment/1.