A Gantt user reported a bug that they couldn't edit the date of a task. We investigated, and found that the reason they couldn't change the date was because the task was the successor of a finish-to-start dependency, and the user was trying to move the start date of the successor task before the end date of the predecessor task.
This is obviously not a bug, but it was hard for the user to tell because they had a large dependency chain.
Is there a way we could show the users a message explaining why they can't change a task's dates in this case (and other similar cases)?
Support Forum
There is a schedulingConflict
event on the project that signalizes that a conflict has happened. It's not super informative in that version of the Gantt I'm afraid since it doesn't provide any useful info on what caused to the conflict.
But you can show a message box saying that a conflict happened at least.
We have upgraded that event and made a new UI informing user of conflicts, cycles and calendar misconfigurations that allows to handle such cases.
But it will appear in the Gantt 5.0.0.
No, it won't be triggered as far as I see in the current state of development. We will think about the logic and decide.
Try to use https://bryntum.com/docs/gantt/#Gantt/feature/TaskDrag#event-afterTaskDrop for now.
It has valid
parameter, so you could show a notification that drag-n-drop is invalid, at least.
All the best,
Alex
Ah sorry I misread your scenario. Indeed that's not a scheduling conflict. If I understand correctly you drag a successor backwards and its predecessor pushes it and does not allow doing that.
Indeed no conflicts happen in that case.
All automatically scheduled tasks are placed at calculated start/end dates. Which is their ASAP (earliest possible) dates by default (could be also ALAP for a backward scheduled project).
So the successor dates are just calculated based on its constraints and dependencies which means according to the predecessor position.