I am using gantt.load to load tasks from a database.
In my dev environment everything works fine, tasks get loaded correctly, but not in my prod environment.
The code is the same, the database call and data returned from that call is also the same, but on the gantt, although the tasks appear, I can’t edit any of them (double click to edit does nothing) and I don’t have a start date.
I’ve been debugging and so far I only notice a difference from one environment to another: my tasks json object in dev keeps numbers as integers:
Hello,
Yes, it affects how everything works.
Duration can only accept integer parameters. If tasks do not have start_date, they try to take the date from its children.
You can try converting the necessary values to have the correct type. You need to have integer duration and string/Date start_date.
If you do not have start_date deliberately, you need to unschedule tasks.
I used the ontaskloading event and parsed all the needed fields from strings to numbers. The problem is that now all the other fields (name, date, etc) stay empty.
I thought I was only updating the task, but it seems that I’m creating a new version of the task? Can you please explain what happens in this event?