Show cool things you have done with our products


Post by Dev_Coppelis »

if root task is set to readonly = true then all subs are set to true also
but if i have a case that i have root (A) which has a child and this child is assigned to resource
i need this resource to edit his assigned task only but when setting its task to readonly = false
h cant edit it because its root is set to readonly

any solution :?: :?: :?:

Post by Maxim Gorkovsky »

Hello.
It is not entirely clear what your use case is, but you can try to override isReadOnly method logic. You can invent some flag that will prevent readonly field lookup on parent tasks, or set readonly to false on task tree modify task, and then restore previous values.
Ext.define('mytask', {
  extend : 'Gnt.model.Task',
  isReadOnly : function () {
    // here goes your logic. currently we lookup all task ancestors, you can try to skip that
  }
})

Post by Dev_Coppelis »

readonly.png
readonly.png (81.38 KiB) Viewed 2629 times
when a user logged in he can only update his own tasks only but if his own task is a child of parent and this parent is not assigned to the current user then the parent task and its child will be readonly.

in this image the marked task should not be readonly but it is readonly because its parent is readonly

Post by mats »

Ok that's different logic than what we intend to support I'm afraid. Try using the override provided above.

Post Reply