Hi,
This scenario is quite similar to a previous post (viewtopic.php?f=52&t=17319&p=85951&hilit=syncdataonload#p85951)
When changing a task's duration to 1 and increasing it's start date by 17 days (25 if weekends are considered). The task duration does not reflect correctly in the Gantt.
As an example, please place the below code in gantt advanced example: (https://bryntum.com/examples/gantt/advanced/)
import { Toolbar, CalendarModel, Toast, DateHelper, CSSHelper, Column, ColumnStore, TaskModel, Gantt } from '../../build/gantt.module.js?449764';
import shared from '../_shared/shared.module.js?449764';
const gantt = new Gantt({
appendTo : 'container',
project : {
eventStore : {
syncDataOnLoad : true
},
repopulateOnDataset : false,
eventsData : [
{
"id": "79d9b2d5-82bc-4e82-9e9f-a030d0463e27",
"name": "Email Notifications & Auto-updates",
"startDate": "2021-02-26T00:00:00",
"endDate": "2021-03-22T23:59:59",
"taskDuration": 17,
"expanded": true,
"manuallyScheduled": true,
"children": [
{
"id": "9e09ccc8-f6c8-4fc6-a92d-c7d82587bae4",
"name": "Daily Task Update Reminder",
"startDate": "2021-02-26T00:00:00",
"endDate": "2021-03-22T23:59:59",
"taskDuration": 17,
"manuallyScheduled": true,
},
{
"id": "05b35d05-21b9-4a06-8898-d9b7f8efcca4",
"name": "New Task Assigned to You",
"startDate": "2021-03-01T00:00:00",
"endDate": "2021-03-01T23:59:59",
"taskDuration": 1,
"manuallyScheduled": true,
},
{
"id": "6f02b615-638d-4643-be59-78b0e7b787b9",
"name": "New Actionable Task",
"startDate": "2021-03-02T00:00:00",
"endDate": "2021-03-02T23:59:59",
"taskDuration": 1,
"manuallyScheduled": true,
},
{
"id": "ab96d5d2-04b8-42a1-b2eb-aa3d80c5bcfd",
"name": "Critical Task Duration has grown or been significantly delayed",
"startDate": "2021-03-03T00:00:00",
"endDate": "2021-03-03T23:59:59",
"taskDuration": 1,
"manuallyScheduled": true,
},
{
"id": "74207363-3804-4c07-964e-e309841972bd",
"name": "Multiple, queued, critical tasks",
"startDate": "2021-03-04T00:00:00",
"endDate": "2021-03-04T23:59:59",
"taskDuration": 1,
"manuallyScheduled": true,
},
{
"id": "a9ac09e5-57a5-41bf-92bb-54ef6b738c48",
"name": "Update Project Start/End Dates",
"startDate": "2021-02-26T00:00:00",
"endDate": "2021-02-26T23:59:59",
"taskDuration": 1,
"manuallyScheduled": true,
},
{
"id": "d535ed23-1692-171e-4f39-305d3b2aa6ca",
"name": "Fill Segment Gaps",
"startDate": "2021-03-08T00:00:00",
"endDate": "2021-03-08T23:59:59",
"taskDuration": 1,
"manuallyScheduled": true,
}
]
}
]},
});
gantt.project.commitAsync().then(async() => {
gantt.eventStore.loadDataAsync([
{
"id": "79d9b2d5-82bc-4e82-9e9f-a030d0463e27",
"name": "Email Notifications & Auto-updates",
"startDate": "2021-02-26T00:00:00",
"endDate": "2021-03-22T23:59:59",
"taskDuration": 17,
"expanded": true,
"manuallyScheduled": true,
"children": [
{
"id": "9e09ccc8-f6c8-4fc6-a92d-c7d82587bae4",
"name": "Daily Task Update Reminder",
"startDate": "2021-03-22T00:00:00",
"endDate": "2021-03-22T23:59:59",
"taskDuration": 1,
"manuallyScheduled": true,
},
{
"id": "05b35d05-21b9-4a06-8898-d9b7f8efcca4",
"name": "New Task Assigned to You",
"startDate": "2021-03-01T00:00:00",
"endDate": "2021-03-01T23:59:59",
"taskDuration": 1,
"manuallyScheduled": true,
},
{
"id": "6f02b615-638d-4643-be59-78b0e7b787b9",
"name": "New Actionable Task",
"startDate": "2021-03-02T00:00:00",
"endDate": "2021-03-02T23:59:59",
"taskDuration": 1,
"manuallyScheduled": true,
},
{
"id": "ab96d5d2-04b8-42a1-b2eb-aa3d80c5bcfd",
"name": "Critical Task Duration has grown or been significantly delayed",
"startDate": "2021-03-03T00:00:00",
"endDate": "2021-03-03T23:59:59",
"taskDuration": 1,
"manuallyScheduled": true,
},
{
"id": "74207363-3804-4c07-964e-e309841972bd",
"name": "Multiple, queued, critical tasks",
"startDate": "2021-03-04T00:00:00",
"endDate": "2021-03-04T23:59:59",
"taskDuration": 1,
"manuallyScheduled": true,
},
{
"id": "a9ac09e5-57a5-41bf-92bb-54ef6b738c48",
"name": "Update Project Start/End Dates",
"startDate": "2021-02-26T00:00:00",
"endDate": "2021-02-26T23:59:59",
"taskDuration": 1,
"manuallyScheduled": true,
},
{
"id": "d535ed23-1692-171e-4f39-305d3b2aa6ca",
"name": "Fill Segment Gaps",
"startDate": "2021-03-08T00:00:00",
"endDate": "2021-03-08T23:59:59",
"taskDuration": 1,
"manuallyScheduled": true,
}
]
},
]);
});
After the loadDataAsync() gets called, 'Daily Task Update Reminder' still has a duration of 17 even though the data provided contains a 1 day task.
Any thoughts / suggestions?
Thanks,
Rayudu