getTaskBaselines

returns an array of baselines of a specific task from the datastore

Baseline[] getTaskBaselines(string | number taskId);
taskIdstring | numberthe task id
Baseline[]an array of baseline objects

Available only in PRO Edition

Example

gantt.getTaskBaselines(5); // -> see details

Related samples

Details

This functionality is available in the PRO edition only.

The getTaskBaselines method is not available if the baselines config is disabled.

The method returns an array with the baseline objects that have the following properties:

  • id - (string | number) - the baseline ID
  • task_id - (string | number) - the ID of the task the baseline belongs to
  • start_date - (Date) - the start date of the baseline
  • duration - (number) - the duration of the baseline
  • end_date - (Date | number) - the end date of the baseline
  • [customProperty: string] - (any) - any custom property

For example:

[
    {
        task_id: 5,
        id: 1, 
        duration: 2, 
        start_date: "03-04-2019 00:00", 
        end_date: "05-04-2019 00:00"
    },
    {
        task_id: 5,
        id: 2, 
        duration: 1, 
        start_date: "06-04-2019 00:00", 
        end_date: "07-04-2019 00:00"
    }
]
See also
Change log

added in v9.0

Back to top