TaskProcessor
12 Sep 20254 minutes to read
To calculate and update task related values
Methods
calculateAutoDuration
To calculate duration of Gantt record with auto scheduled start date and auto scheduled end date
| Parameter | Type | Description |
|---|---|---|
| ganttProperties | ITaskData |
Defines the gantt data. |
Returns number
calculateDuration
To calculate duration from start date and end date
| Parameter | Type | Description |
|---|---|---|
| ganttData | IGanttData |
Defines the gantt data. |
| isBaseline (optional) | boolean |
Indicates whether the calculation is specific to baseline dates. |
Returns void
calculateLeftValue
Calculates the left pixel value for a task on the Gantt chart, considering non-working days.
This method calculates the horizontal position or “left value” for a task based on its start date, current date,
and the position of non-working days. This is useful for determining the visual placement of tasks in the Gantt chart.
| Parameter | Type | Description |
|---|---|---|
| timelineStartDate | Date |
The start date of the timeline from which to calculate the left position. |
| currentDate | Date |
The current date for which the left value is being calculated. |
Returns number
calculateScheduledValuesforBaseline
Calculates the scheduled values for the baseline of a task.
| Parameter | Type | Description |
|---|---|---|
| ganttData | IGanttData |
The Gantt data containing task information. |
| data | Object |
The additional data containing baseline duration and dates. |
| isLoad | boolean |
A flag indicating if the method is called during the loading process. |
Returns void
getFieldMappings
Gets task field mappings based on baseline context.
| Parameter | Type | Description |
|---|---|---|
| isBaseline | boolean |
Flag indicating if baseline fields should be used. |
Returns Object
updateDurationWithWork
Method to update duration with work value.
| Parameter | Type | Description |
|---|---|---|
| ganttData | IGanttData |
. |
Returns void
updateTaskLeftWidth
Update all gantt data collection width, progress width and left value
| Parameter | Type | Description |
|---|---|---|
| data | IGanttData |
. |
| parentRecords | Map |
. |
Returns void
updateUnitWithWork
Update units of resources with respect to duration and work of a task.
| Parameter | Type | Description |
|---|---|---|
| ganttData | IGanttData |
. |
Returns void
updateWorkWithDuration
Method to calculate work based on resource unit and duration.
| Parameter | Type | Description |
|---|---|---|
| ganttData | IGanttData |
. |
Returns void