Hi,
I encountered a strange behavior in the Gantt chart when enablePredecessorValidation={false} and isInPredecessorValidation = true in the taskbarEditingEvent. For some reason, after the Gantt is loaded and filled in with data, when I move a milestone from the top of the tasks list.. the Gantt is triggering PredecessorValidation and ruins the entire scheduling of the tasks.
In our usage, we have mostly milestones in the tasks list. When the predecessor validation is happening, all the milestones happen in the same day because there is no duration.
After some research, I found out that we can disable the predecessor validation and rely on the dependency + offset to display the milestones in time like the project manager wants. So this was fixed by enablePredecessorValidation={false}.
The second issue was that the data was loading fine, displaying the milestones with offsets but there was no longer any dependency happening, meaning that if I moved a milestone, the rest were not moving. In order to fix this I added in the taskbarEditingEvent the parameter isInPredecessorValidation = true as I found out in this forum.
So now everything is working as expected except the first interaction with the Gantt after the data is loaded. Moving the first milestone, will reset everything and afterwards everything seem to work as expected, so only in the first interaction this is happening and I don't know why.
I prepared an example:
https://stackblitz.com/edit/react-6lscfc-3nabjn?file=data.js,index.js
If you move (via drag and drop) the milestone Project start - comissioning .. by one day, then everything is reset..
Is there a way to fix this?
Hi Mircea Catalin,
Greetings from Syncfusion support.
We have checked you query but the details you have shared is not much enough to understand the exact requirement. Whether you want to restrict the predecessor validation between the tasks then you can leave the default value of isInPredecessorValidation as false inside the taskbarEditingEvent. If you change the isInPredecessorValidation equal to true then the predecessor validation should be performed, based on that the dates should be changes as per the validation, which is the default behavior. So, we request you to share below details, which will be useful for us to provide you with a better solution.
Regards,
Gopinath M
Hi Gopinath M,
Hi Mircea Catalin,
Thanks for sharing the video.
We would like to inform you that the dependency is the relationship between predecessor and successor tasks. The predecessor is the first task which controls the start or end date for all related successor tasks. The successor, by contrast, is the task whose start or end date is controlled by the predecessor. In your sample you have used the cascade dependencies functionality, whenever you have modified a Start and/or End date for the predecessor task, the changes automatically roll down to dependent tasks(successor tasks), which results in predecessor validation for all connected successor task and change the start date of all successor task, but it should not affect the start or end date of any related predecessor task, which is not an issue and it is the default behavior in Task Dependency.
We have attached a Video demonstration for your reference. In this demo, you can see that when you moved a task, only the start date and end date for all connected successor tasks is changed, and this should not affect the start date and end date of any predecessor task. Please check this below video demonstration for more details,
Video Demonstration: https://www.syncfusion.com/downloads/support/forum/178466/ze/Predecessor_offset849680667.zip
Regards,
Gopinath M
Hi Gopinath M,
Ohhhh, now I realized why it was not working for me as expected. How embarrassing.. I was saving the offsets into the DB but forgot to update some code that was retrieving the data on the predecessor column. I have a piece of code that if the predecessor is null, then it computes it.. but without offset.
So, basically my data does not contain the offsets. I got mislead by the fact that even without the offsets the milestones were in the correct spot because of the start and end dates..
I noticed this mistake by looking at your video when you show the offsets, I then looked at mine...and all my data had missing offsets.
I updated my code and everything is working as expected.
Many thanks for your explanation and video!
Regards,
Mircea
Hi Mircea,
You’re most welcome.
We are glad to know that the reported problem has been resolved at your end. Please get back to us if you require any further assistance on this.
Regards,
Gopinath M