ProjectData#

A whole plan as one plain object: its tasks, plus optional config, calendars, links, resources and assignments. Input only: build it and pass it to Project#solve, Project#analyze or schedule. No call returns it.

Fields#

Field Type Default Description
tasks TaskData[] required The tasks of the plan.
config SchedulingConfig every field at its default Scheduling switches for the whole plan. null reads as omitted.
calendars CalendarData[] [] Working-time calendars that tasks and resources reference by id.
links LinkData[] [] Dependencies between tasks.
resources ResourceData[] [] Resources that assignments book.
assignments AssignmentData[] [] Resource bookings on tasks.

An optional array can be left out or set to undefined. null in place of an array is a parse error. Unknown fields are ignored, both on ProjectData and in the records inside it, so objects with extra UI fields can be passed as they are.

Date fields take a DateValue: a string or a local Date.

Used by#

  • Project#solve: data loads the plan into the project and schedules it
  • Project#analyze: data supplies the dates to analyze without loading them
  • schedule: data is the plan to schedule once

Example#

const data = {
  config: { duration_unit: "day" },
  calendars: [{ id: "global", worktime: { hours: ["8:00-12:00", "13:00-17:00"] } }],
  tasks: [
    { id: 1, start_date: "2026-03-02 08:00", duration: 3 },
    { id: 2, start_date: "2026-03-02 08:00", duration: 2 },
  ],
  links: [{ id: 1, source: 1, target: 2, type: "fs" }],
  resources: [{ id: "ann" }],
  assignments: [{ task: 1, resource: "ann", value: 1 }],
};