Our state of the art Gantt chart


Post by S.R. »

Hi all,

I recognized the following (for me unexpectd) behavior:
Having a linked chain of tasks T1 -> T2 -> T3 -> T4
All links are active.

Now indent T3.

Result is that

  • the dependency from T2 to T3 changes to inactive. => OK
  • the start date of T3 changes to the start date of T2 (the new parent). => ?

My expectation is, that T3 stays where it is (i.e. unchanged) and T2 adapts its dates to T3 as the new parent.
T3 is just indented. So I see no reason to adapt the dates of this task.
T2 has to adapt its dates as parent of T2.
The inactive dependency has also no effect anymore on T3.

Is it a bug or a feature?


Post by S.R. »

Additional question to this example:
If T2 becomes a parent of T3 due to the indentation, T2 is still linked with T3.
If I try to create such a link (i.e. from a parent to its child) manually, it's not possible due to a dependency cycle - I assume.
=> Is the link between T2 and T3 and the date changes of T3 a bug or intended?


Post by arcady »

S.R. wrote: Mon Jun 17, 2024 12:54 pm

Hi all,

I recognized the following (for me unexpectd) behavior:
Having a linked chain of tasks T1 -> T2 -> T3 -> T4
All links are active.

Now indent T3.

Result is that

  • the dependency from T2 to T3 changes to inactive. => OK
  • the start date of T3 changes to the start date of T2 (the new parent). => ?

My expectation is, that T3 stays where it is (i.e. unchanged) and T2 adapts its dates to T3 as the new parent.
T3 is just indented. So I see no reason to adapt the dates of this task.
T2 has to adapt its dates as parent of T2.
The inactive dependency has also no effect anymore on T3.

Is it a bug or a feature?

Hello,

If T3 task is not manually scheduled then this is by design.

Initially T3 task has an incoming dependency which constrains it to go after T2 task (T2 in turn is restricted by T1 task).

After indenting T3 task it's no longer constrained with T2->T3 dependency (as you mentioned it's deactivated). So the task is restricted implicitly by T1->T2 dependency only. Since child tasks inherit their parents constraints. So T3 task is rescheduled based on its new set of restrictions.

Best regards,
Arcady


Post by arcady »

Additional question to this example:
If T2 becomes a parent of T3 due to the indentation, T2 is still linked with T3.
If I try to create such a link (i.e. from a parent to its child) manually, it's not possible due to a dependency cycle - I assume.
=> Is the link between T2 and T3 and the date changes of T3 a bug or intended?

Yes parent-child dependency is invalid due to its cyclic nature.

T2 is still linked with T3.

In generic Gantt It's up to user's choice. A conflict is thrown which then gets resolved by either removing or deactivating the invalid dependency.
Yes you can't create an invalid dependency in UI out of the box. It's not a bug this is by design.
If you want to do that you need to override standard code.


Post by S.R. »

Thanks for the explanations!


Post by S.R. »

Hi again,

I have a question in this context.
We do not want to allow cyclic dependencies, even if they are inactive.
To solve this, I would like to reduce the CycleResolutionPoup to the two options "Cancel the change" and "Remove the dependency".
In my understanding I can reach this by specifying my own popup via Gantt config parameter "cycleResolutionPopupClass".
I wrote a class "MyCycleResolutionPopupClass" which extends "CycleResolutionPopup".
But as I cannot override method "buildInvalidDependencyResolutions" I have no possibility to reduce the resolving options.

Is there another way to reach my goal?
Or do I misunderstand this option?

Thanks in advance for any hints!


Post by Animal »

You could target that item with a CSS rule and make it display:none:

Screenshot 2024-06-19 at 10.14.11.png
Screenshot 2024-06-19 at 10.14.11.png (909.7 KiB) Viewed 76 times

Post by arcady »

Hello,

Resolution are provided by conflicts so you can override SchedulerProCycleEffect class getResolutions method

class MySchedulerProCycleEffect extends SchedulerProCycleEffect {

    // override standard set of resolutions
    getResolutions() {
        const result = super.getResolutions(...arguments);

        // skip "deactivate dependency" option
        return result.filter(r => !r.isDeactivateDependencyResolution);
    }

}

const gantt = new Gantt({

    project : {
        // let project know of our overridden class
        cycleEffectClass   : MySchedulerProCycleEffect,

We have tickets (like this for example) to make that popup more configurable but they are not resolved yet unfortunately.

Best regards,
Arcady


Post by S.R. »

Hi Arcady,

unfortunately your proposal seems not to work with 5.6.12.
I get the following compile error:
Module '"@bryntum/gantt/gantt.umd.js"' has no exported member 'SchedulerProCycleEffect'.

And "cycleEffectClass" seems not to be an official configuration option.


Post by S.R. »

The workaround via CSS works.
Thanks for this hint!

But a configuration option would be perfect. :-)


Post Reply