Task update constraint_type,ganttview not update,when i update task constraint_type from "snet" to "asap",how to update ganttview task

?:喜悦:喜悦:喜悦:喜悦:喜悦:喜悦:喜悦:喜悦:喜悦:喜悦:

Hello,
We are aware of the issue that if a task is not linked to other tasks and you update its constraint, it is moved to a new date in the case of the ALAP constraint, but it doesn’t move to an earlier date when you set the ASAP constraint.
The dev team will fix the bug in the future, but I cannot give you any ETA.

As a workaround, you can apply the following code to update the task dates after changeing the constraint_type to ASAP:

  if (task.constraint_type == 'asap' && task.parent && !task.$source[0] && !task.$target[0]){
    task.start_date = gantt.getTask(task.parent).start_date;
    task.end_date = gantt.calculateEndDate(task.start_date, task.duration);
  }

Here is the snippet:
https://snippet.dhtmlx.com/5/1a36c84c5

If you mean something different, please clarify.

Also, please post your questions only in English.

when i update constraint_type ,how to update ganttview,
 code:  gantt.getTask(taskId)["constraint_type "]=“mso”,
 gantt.getTask(taskId)["constraint_date "]=new Date();
i  gantt.updateTask(taskId); ganttview is unchange;

Hello,
Thank you for the clarification.
If you set or change the constraint via API methods, you need to apply the autoSchedule() method to move the task to a different date. Here is an example:
http://snippet.dhtmlx.com/5/5505ab9e0

thanks …

Hello,
The dev team fixed the bug with the ASAP constraints.
https://docs.dhtmlx.com/gantt/whatsnew.html#714
As the new feature partially changes the old behavior, they decided to use the Strict mode. Previously, the auto_scheduling_strict parameter worked only in the compatibility mode. Right now, we don’t have that information in the documentation, but it will be added later.
You can check how it works in the following snippet:
http://snippet.dhtmlx.com/5/d11905a54