Our state of the art Gantt chart


Post by rodel.ocfemia »

Hi,
Currently, if we draw dependency from child to parent task, it's not allowed.
Is there a way to allow child to parent dependency?

Child to Parent dependency.png
Child to Parent dependency.png (70.21 KiB) Viewed 134 times

Post by mats »

No, as this would create a cycle. What's your use case for needing this?


Post by rodel.ocfemia »

It's one of the story requirements.


Post by alex.l »

Hi,

Do you need some specific behaviour because of that? Maybe we could find another way to achieve this which won't make loop and contradiction?

All the best,
Alex


Post by rodel.ocfemia »

Hi,
I"m not sure if I understand your question correctly. But if you are asking the business reason behind why we need to support child to parent dependency, then I'm not able to answer that.


Post by alex.l »

No I mean what behaviour do you expect from that relation? In fact it causes a conflict and scheduling cycle. So that doesn't look like a correct way to go. Maybe we could find instruments which fit your needs.

All the best,
Alex


Post by rodel.ocfemia »

Somehow the old tools used for gantt scheduling was supporting child to parent, then they wanted to retain the same features. The reason behind, I don't know.


Post by alex.l »

Unfortunately it is not supported, because it makes conflicts in scheduling.

In case the only thing you need is display the line without any affect, you can try to use inactive dependencies.
You will need to override some code to make possible create inactive dependencies, also to pass validation.
First thing, try to change dependency to inactive using this event https://bryntum.com/products/gantt/docs/api/Scheduler/feature/mixin/DependencyCreation#event-beforeDependencyCreateDrag
https://bryntum.com/products/gantt/docs/api/Gantt/model/DependencyModel#field-active

Also override https://bryntum.com/products/gantt/docs/api/Scheduler/data/mixin/DependencyStoreMixin#function-isValidDependency on DependencyStore.

That might help to achieve this.

All the best,
Alex


Post by rodel.ocfemia »

Hi,
The beforeDependencyCreateDrag event is triggered just right after I started the drag.

Questions:

  1. What event to listen when the dependency line is being connected to other task?
  2. If invalid dependency, how can I override it so that bryntum allows dependency to be connected/created?

Thanks


Post by alex.l »

Hi,

  1. Depends on what is the goal. Try this event https://bryntum.com/products/gantt/docs/api/Gantt/feature/Dependencies#event-beforeDependencyCreateFinalize
    All the list you can find here https://bryntum.com/products/gantt/docs/api/Gantt/feature/Dependencies#events
  2. I mentioned that, you need to override this Scheduler.data.mixin.DependencyStoreMixin#function-isValidDependency on DependencyStore.

All the best,
Alex


Post Reply