Our state of the art Gantt chart


Post by jeanbaptiste.minani »

Hello,

I am creating task with this code

items.add.menu.subtask.onItem=async ({taskRecord}) => {
                    const task = await gantt.addSubtask(taskRecord);
                    task.name = 'New subtask'; 
                    task.duration = 1; 
                    console.log(gantt.project.calendar.id);
                    task.calendar=gantt.project.calendar.id;
                    gantt.project.commitAsync();
}

by setting default duration to 1 day , but on gantt view the created task appears to have 0 days duration. How this can be fixed?
The gantt.project.calendar.id is 'business'.

Thanks.


Post by mats »

Seems to work fine for me, can you please provide a clear test case?

Attachments
Screenshot 2021-10-27 at 09.13.13.png
Screenshot 2021-10-27 at 09.13.13.png (91.91 KiB) Viewed 182 times

Post Reply