Discuss anything related to web development but no technical support questions


Post by fernando.nvicente »

I'd like to know if there is any possibility to bind the fields "Duration" and "Effort". Is there a function suitable for this purpose?

For example: I set 3 hours in the "Duration" field, therefore the "Effort" field will have the same value as well. Just like a mirror.

Post by arcady »

You can extend Gnt.model.Task class and override these methods: setDuration, setEffort.

Also beware that these fields have specific behavior depending on task scheduling mode.

Post by fernando.nvicente »

This change has to be made in advanced.js file?

Please could you pass an instance like set the Duration field in the Effort

Post by arcady »

Ext.define('MyTaskModel', {
    extend : 'Gnt.model.Task',

    setEffort: function (number, unit) {
        this.callParent(arguments);
        // place here the code you want to be executed after effort change
    }
})

Post Reply