LinkData#
A dependency between two tasks: which task drives which, through which pair of dates, and with how much lag. Input only: pass it in ProjectData.links, or add and edit links through a SchedulingChanges change set. No call returns it.
Fields#
| Field | Type | Default | Description |
|---|---|---|---|
id |
Id |
required | Link id. Must be unique among the links of the project. |
source |
Id |
required | The predecessor task. |
target |
Id |
required | The successor task. |
type |
"fs" | "ss" | "ff" | "sf" | 0 | 1 | 2 | 3 | "0" | "1" | "2" | "3" |
"fs" |
Which date of source drives which date of target: "fs" finish-to-start, "ss" start-to-start, "ff" finish-to-finish, "sf" start-to-finish. The numbers 0-3 and the strings "0"-"3" are aliases, in that order. Letter codes are case-insensitive. null reads as "fs". |
lag |
number | null |
0 |
Offset between the two dates, in working time on the target task's calendar, measured in lag_unit. A negative value is a lead. null reads as 0. |
lag_unit |
TimeUnit | null |
config.duration_unit |
Unit of lag: "minute", "hour" or "day". null reads as omitted. |
Id is a string or a number; 0 and "0" name the same task. See Id.
Unknown fields on a link are ignored.
Validation#
- A duplicate
idthrowsInputErrorwithkind: "validation"and a path likelinks[3].id. - A
typeoutside the accepted values throwsInputErrorwithkind: "validation". - A link whose
sourceortargetis unknown or unscheduled isn't an error. The project drops it and reports adropped-linknote inScheduleResult.notes. - A link between a summary and one of its own descendants is dropped the same way, unless
SchedulingConfig.descendant_linksistrue. - A link from a task to itself is kept. It forms a one-task cycle, reported in
ScheduleResult.cycles.
Used by#
Project#solve,Project#analyzeandschedule: throughdata.linksProject#applyandProject#preview:changes.links.addtakesLinkDatawith an optionalid(generated when absent), andchanges.links.updatetakes a partialLinkDatawith a requiredid
Example#
const = ;
Related#
ProjectData- the plan that carrieslinksLinkAdd- a link added through a change setLinkUpdate- editing an existing link- Links, constraints and summaries - link types, lag and cycles