TaskUpdate#
A partial edit of one existing task: its id plus the fields to change. It appears as an entry of tasks.update in a SchedulingChanges set. To add a task, send a TaskData record in tasks.add instead.
Each field has three states. Left out, it keeps its current value. A value sets it. null clears an optional field or puts a field that always has a value back to its default. Field names are snake_case, and a record must be a JSON object. Unknown fields are ignored, so an entry of ScheduleResult.updates can be sent back as a TaskUpdate as it is. See Wire format.
Fields#
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
id |
Id |
yes | - | Id of the task to change |
parent |
Id | null |
no | unchanged | New parent summary. null, "" and a value equal to config.root_id move the task to the top level |
start_date |
DateValue | null |
no | unchanged | New start date. null clears it |
end_date |
DateValue | null |
no | unchanged | New end date. null clears it |
duration |
number | null |
no | unchanged | New working time in the task's duration_unit. null clears it |
constraint_type |
ConstraintType | "" | null |
no | unchanged | "asap", "alap", "snet", "snlt", "fnet", "fnlt", "mso" or "mfo". "" and null remove the constraint |
constraint_date |
DateValue | null |
no | unchanged | Date of a dated constraint. null clears it |
auto_scheduling |
boolean | null |
no | unchanged | false fixes the task. null resets it to true |
unscheduled |
boolean | null |
no | unchanged | true takes the task and its descendants out of the plan. null resets it to false |
progress |
number | null |
no | unchanged | Completion from 0 to 1. null resets it to 0 |
calendar_id |
Id | null |
no | unchanged | Calendar the task works on. null clears it, so the default calendar applies (or the inherited one with calendar_mode: "task-inherited") |
priority |
number | null |
no | unchanged | Leveling priority, a whole number from 0 to 1000. null resets it to 500 |
leveling_delay |
number | null |
no | unchanged | Elapsed time before the task's driven start, in the task's duration_unit. null resets it to 0 |
pauses |
Pause[] | null |
no | unchanged | Replaces the whole list of leveling splits. [] and null remove every pause |
type and duration_unit aren't fields of TaskUpdate. Sent in an update, they're ignored like any unknown field. See What change sets can't do.
Which of start_date, end_date and duration an update keeps and which it derives is described in Which dates a task update keeps. An update without dates keeps the stored start and duration, unless it changes pauses or leveling_delay. See Delays and pauses.
An unknown constraint_type, a priority outside 0..1000 or an invalid date fails the whole call with a validation error that has no path. In apply, this means no operation from that change set is applied. Other invalid values reject only this update. It's listed in ApplyReport.rejected.
Used by#
JsonProject.applyandJsonProject.preview: inSchedulingChanges.tasks.updateJsonProject.evaluate: in a candidate'schanges.tasks.updateJsonProject.suggestAssignments: returned inresult.changes.tasks.updatewhenclearFirstis set
Example#
A drag, a resize, a new constraint, a reparent and a leveling reset:
Related#
SchedulingChanges- the change set that carries updatesTaskData- the full task recordMutation- result entries that decode as updates- Editing a Project - which dates an update keeps
- Clear leveling - resetting delays and pauses