Thank you for the clarification. If you want to allow users to drag tasks to any position, do you really need to use the auto-scheduling feature? Without that, Gantt won’t move tasks at all:
In most of the samples, Gantt doesn’t use auto-scheduling and allows placing tasks to any date. For example:
Projects and milestones
That might simplify things, though without the auto scheduler wouldn’t I lose the automatic calculation of non-workdays? e.g if I move a task to a weekend, it needs to move so it isn’t on the weekend, or so it spans the weekend but maintains the correct duration. Would I have to implement all of this myself?
If you only want to drag a predecessor task and move all its successor tasks, it is not necessary to use auto-scheduling. Here is an example of the implementation that allows you to do that:
https://docs.dhtmlx.com/gantt/desktop__dragging_dependent_tasks.html#movingtasksmanually 2
Here is the snippet:
http://snippet.dhtmlx.com/5/d77ce2b39
As mentioned previously, would I need to calculate the jumping of non-workdays?
I understand the concepts behind the auto scheduler and constraints, but it still feels like there is a bug somewhere based on everything you’ve described. Specifically looking at this snippet you kindly provided me before DHTMLX Snippets
When it loads everything is normal. Now I move Task #2
forward and we can see the constraint applying as you suggest. It’s now “Start no earlier than”. The link has been modified to have a lag of 1
.
Now I move Task #2
back to the original position
Now you can see that the constraint type has not change, but the constraint date HAS changed correctly to the 2nd April, yet the task itself was moved back to the 3rd of April. If I double click the task to trigger the auto scheduler, it then moves the task back to the correct position.
I’m not understanding how this is expected behaviour. The constraint is modified, the lag is modified, and when the auto scheduler is run after all the changes are made it does work correctly, but it fails to work correctly immediately after making a change.
I’m happy to look at not using the auto scheduler and doing it manually, but we do need the ability to not allow scheduling of tasks on non-workdays