Task End date at backend


#1

background : System is loading the tasks and links from the backend api.

For each task there is a start date and duration. And the tasks are interdependent.

e.g. Op 10–& ;Op 20 --; Op 30.

To Be: Using the gantt module the end date of each task should be calculated and using the gantt.createDataProcessor() it should be send back to backend api(through REST put)

Problem Statement: The end date of first operation (e.g. Op 10) is never getting calculated and it is not detected by gantt.createDataProcessor().

However the end date of dependent tasks e.g. Op 20, Op 30 are getting calculated.

Please provide the solution /workaround to calculate the end date of root task.


#2

Hello,
If the root task is a project task, it is expected behavior.
Project tasks ignore the date parameters(start_date, end_date, duration) and obtain them from the children. So, you don’t need to worry that the end_date is not updated as project tasks should be loaded with the correct dates regardless of the end_date value.
If you still need to have the correct dates in the database, you need to manually implement a custom solution and use the updateTask method on project tasks. Here is an example of how you can do that when loading tasks:
http://snippet.dhtmlx.com/5/58f03ed55
Here are examples of the implementation when you update children tasks:
http://snippet.dhtmlx.com/9fc77aec6
http://snippet.dhtmlx.com/9aa933308


#3

Thanks for the response. Task is not project type. Let me explain:
we are loading data from excel to backend then we send it to frontend to load data to gantt.
Please refer below picture of project schedule structure. We are not able to get calculated end date for OP10 for every subproject WO-01/WO-02/WO-03 etc. Here almost all tasks are sequentially linked i.e. OP10->OP20->OP30->OP40 like that. End date is calculated and available for OP20 and onward but not for OP10, which is very first task.
Can you please help us on this.
ProjectStructure


#4

Hello,
Thank you for the clarification.
It seems that you rely on the auto-scheduling function. When Gantt auto-schedule tasks, only the successor tasks will be changed, so after they are updated, Gantt will send the changes to the server.
For example, in the following snippet, Gantt will send the changes for tasks #2, #3, and #4. As Task #1 was updated, the changes aren’t sent to the server:
http://snippet.dhtmlx.com/5/93a4188ac

To send the changes for each task after loading the chart, you need to update it:
http://snippet.dhtmlx.com/5/1fcf9958b

If you have a different use case, please, reproduce the issue in the snippet, then click on the “Share” button and send me the link.