Custom columns value null in "gantt.getTaskByTime()"

I have created a few custom columns in the gantt, and the value is calculated. Everything works well except when I wants to get the whole data using gantt.getTaskByTime() I dont see any values in custom columns.

"late_start": null,
"late_finish": null,

Hello,
I tried to reproduce your issue in the snippet below:
https://snippet.dhtmlx.com/oqurzvwq ;
but it seems to work correctly to me ( gantt.getTaskByTime() show the data in the console).
Probably, it should be related to Gantt configuration, but it is hard to suggest what might be wrong as I don’t see your code.
Please, add your configuration in the snippet above and make sure that the issue is reproduced there.
Then, click on the Save button and send me the link. Or send me a ready demo with all the necessary JavaScript and CSS files so that I can reproduce the issue locally.

Hello,
If you calculate the values in the template function in the column configuration and don’t assign it to the task object, the calculated values will only be displayed in the grid. And the task object won’t have these values:


https://snippet.dhtmlx.com/4x1zddkf

In this case, it works as expected. You need to manually assign the properties to the task object after calculating the values:


https://snippet.dhtmlx.com/dclum5co

Thanks for the response with clarification, I am currently looking into it. Yes, at certain point of code I am able to access the values, but as moves forward before I submit to save, the values get changed to NULL. The issue is seems to be at my side, thanks @ramil for your time.

1 Like