bug occurs when using auto_schedule and worktime

im new here and not good at english, sorry;

here’s my code;
http://snippet.dhtmlx.com/5/e1f7edb91

with auto_schedule and worktime enabled,

once i connect my tasks with links, the last task will move long way to the right place , skipping lots of weeks;

hope you could notice this;

thanks a lot

Hello,
It seems that the issue occurs because of the duration_step parameter, so, the getClosestWorkTime method returns a wrong date.
I added it as a bug to our internal bug tracker. The dev team will fix the issue in the future, but I cannot give you any ETA.
As a workaround, you can specify the task duration without this parameter:
https://snippet.dhtmlx.com/cexa4ahb

Hello,
The dev team fixed the bug with the getClosestWorkTime method when using the duration_step config:
https://docs.dhtmlx.com/gantt/whatsnew.html#904:~:text=Fix%20an%20incorrect%20date%20calculation%20in%20getClosestWorkTime%20when%20using%20the%20duration_step%20config

You can check that the issue is no longer reproduced in the following snippet:
https://snippet.dhtmlx.com/hl85778a