ProjectData#
The full project snapshot: scheduling config, calendars, tasks, links, resources and assignments. It's the data_json argument of schedule, JsonProject.solve and JsonProject.analyze, sent as JSON text. ProjectData is an import format: no call returns it.
tasks is required in ProjectData; send "tasks": [] for an empty project.
Fields#
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
config |
SchedulingConfig | null |
no | all defaults | Project-wide scheduling settings. null gives the default config. |
calendars |
CalendarData[] |
no | [] |
Working calendars. Without a "global" entry, the built-in global calendar applies: Monday to Friday, 08:00-12:00 and 13:00-17:00. |
tasks |
TaskData[] |
yes | - | Tasks, summaries and milestones. |
links |
LinkData[] |
no | [] |
Dependencies between tasks. |
resources |
ResourceData[] |
no | [] |
Resources that assignments book. |
assignments |
AssignmentData[] |
no | [] |
Resource bookings on tasks. |
The payload must be a JSON object. The five lists can be omitted, but not set to null: "links": null fails with parse. Unknown top-level fields are ignored. Field spelling and null handling are described in Wire format.
Validation#
The snapshot is decoded first, then checked as a whole. Decoding errors return kind: "parse" with path: null:
- the payload isn't a JSON object
tasksis missing ornull- a list field is
nullor not an array
After decoding, every record is checked against its own rules (listed on each record's page), and the snapshot is checked across records. A failed check returns kind: "validation" with path pointing at the offending record or field:
| Check | Example path |
|---|---|
Duplicate id within tasks, links, resources, assignments or calendars. Ids compare like JavaScript object keys, so 1 and "1" collide. |
tasks[1].id, calendars[1] |
A task parent that names no task in the snapshot. |
tasks[0].parent |
| A cycle in the task hierarchy. | tasks[0].parent |
A task calendar_id, or a resource calendar_id in "resource" calendar mode, that names no calendar. |
tasks[0].calendar_id |
An assignment task or resource that names no record in the snapshot. |
assignments[0].resource |
A link whose source or target names no task isn't an error. The link is dropped and reported as a dropped-link note in the result.
These are the strict-mode rules. schedule always validates strictly; a JsonProject created with {"validation": "repair"} fixes some of these inputs instead and reports each fix as a repaired note. Repair fills missing task dates from config.project_start or from other dated tasks, so an entirely undated project is still rejected.
Used by#
schedule-data_json, requiredJsonProject.solve-data_json, optional; replaces the project's dataJsonProject.analyze-data_json, optional; the dates to analyze
Example#
Related#
TaskData- task recordsSchedulingChanges- edits after the data is loadedScheduleResult- what scheduling returns- Project data - building a snapshot and its validation rules
- Accept messy input - repair mode for imperfect data