Dependent task moving incorrectly


#1

I’ve got a problem where a start_to_finish dependency is incorrectly being calculated when I resize a task and I can’t quite figure out what’s going on. I’ve put together an example that isn’t working:

http://snippet.dhtmlx.com/5/c7f889df5

The example has a very basic structure

  • Task 1
  • Task 2
    ---- Task 2.1

There is one link between Task 2.1 and Task 1. The link has a lag of 1 day.

  • If I move Task 2.1 forwards or backwards, Task 1 correctly moves forwards or backwards accordingly
  • If I resize Task 2.1 start date, Task 1 does not get moved at all (incorrect given the dependency type)

  • If I resize Task 2.1 end date, Task 1 does move even though it shouldn’t

It seems like there’s something going wrong when resizing tasks. I’ve tried changing the constraint type and various other configuration options but I’ve not had any luck


#2

Hello,
It seems to be related to the type of the link’s type property.
Gantt expects the String type:


https://docs.dhtmlx.com/gantt/desktop__loading.html#dataproperties

In your case, it is Number, so, there is no guarantee that it will work correctly.

To use the Number type, you need to modify the gantt.config.links parameter:
https://docs.dhtmlx.com/gantt/api__gantt_links_config.html
Here is the updated snippet with the fixed link type:
http://snippet.dhtmlx.com/5/aa5fd8f50


#3

Facepalm! Thanks for that, appears to be working correctly now. I wonder if it would be worth the gantt spitting out warning about things like this. I never would have found that or even considered that was an issue