Our state of the art Gantt chart


Post by Mehdi »

Hello,

We have a problem with the constraints "must ...".

Currently it is possible to define 2 tasks one before the other and add a must start on constraint to the successor. The problem is only the constraint "must start" is respected.
We don't understand why no alert popup appear to the user to prevent the problem.

You can replicate the problem with the online example : https://www.bryntum.com/examples/gantt-for-extjs/kitchensink/#examples/constraints

1. remove the constraint on the first task "Constrained Task"
2. change the constraint on the second task to "must start on"
3. drag and drop the "Constrained Task" to a later date than the constraint.
4. no alert to prevent user than predecessor/successor constraint can't be respected

It should not be possible to have an arrow that goes back to the gantt (see enclosure).

Thanks again for your responsiveness and your help.

Note: We have the same problem in our project and we have set these variables
scheduleByConstraints: true,
checkDependencyConstraint: true,
checkPotentialConflictConstraint: true
Attachments
CaptureForBryntum.PNG
CaptureForBryntum.PNG (8.23 KiB) Viewed 877 times

Post by FrancZ »

Any help please?

Thanks in advance!

Post by arcady »

I cannot call it a bug since we never planned it to work the way you request. So far I'll make a feature request for this: https://app.assembla.com/spaces/bryntum/tickets/9467-show-the-constraint-violation-ui-when-a-dependency-gets-broken/details

You can actually try implementing your custom constraint for this. Here is a short snippet to give you an idea on how it could look:
Ext.define('MyConstraint', {
    extend      : 'Gnt.constraint.Base',

    singleton   : true,

    requires    : ['Ext.String'],

    getId : function () {
        return 'myconstraint';
    },

    isSatisfied : function (task) {
        // Constraint conflict happens when we see a negative slack value
        // (which normally means a scheduling conflict)
        return task.getTotalSlack() >= 0;
    },

    hasThisConstraintApplied : function (task) {
        var store  = task.getTaskStore(true);

        // Here we can define a condition if this constraint should be checked
        // for example the constraint requires "scheduleByConstraints" mode enabled
        return store && store.scheduleByConstraints;
    },

    getResolution : function (callback, task) {
        var me         = this,
            resolution = me.callParent(arguments);

        resolution.description = "This will cause a scheduling conflict", task.getName(), "Scheduling conflict";

        return resolution;
    }

    ...

});
Investigate the existing constraints code for inspiration and extra info.

Post Reply