Our state of the art Gantt chart


Post by DevHouse »

When setting the start date of the Gantt in the ProjectModel and adding a constraint to the parent task, you are not able to drag the parent task back. Not even to the start date of the project. It is only for the parent. Dragging a child back to the start date of the project also drags the parent back, but dragging the parent back does nothing.

I assume that it is not possible to drag a task before the start date of the project, but dragging it back to the start date should be possible.

Is there a reason for this behaviour or is it something that should've been able?

CodePen: https://codepen.io/isazulay/pen/JjNBBvg
Try dragging the "Write docs" task back.

Is there maybe a way to set the project start date dynamically, so that tasks can be dragged to before the start date of the project and the project start date changes based on this?


Post by arcady »

I'm afraid this is by design. A summary task gets its start/end dates based on its children (min children start and max children end respectively).
In your case "Write docs" cannot fall back since its has a "Proof-read docs" child that forced to start not earlier than 2020-01-02. And that task start defines the summary task start date.

Here is the guide that describes scheduling process in detail: https://bryntum.com/docs/gantt/#../engine/gantt_events_scheduling.md

Is there maybe a way to set the project start date dynamically, so that tasks can be dragged to before the start date of the project and the project start date changes based on this?

There is no such way at the moment (well except data loading stage when the project is able to detect its start based on its tasks start dates).
The project start is fixed since all task dates are basically calculated based on that value. So if the project start depended on tasks that would build an infinite computation cycle. So current version does not allow that.

I also doubt that this would be really useful.
I mean: user drags a single task before the project start then -> we change the project start -> it causes moving of all unconstrained tasks back to the new project start. Just because of a single task move?
Sounds strange to me ..could be useful in some edge cases when user really wants to move all tasks (but then why not simply change the project start date instead? why dragging a task?).


Post Reply