Page 1 of 1

ReadOnly Task

Posted: Sun Aug 12, 2018 7:18 pm
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 :?: :?: :?:

Re: ReadOnly Task

Posted: Mon Aug 13, 2018 9:31 am
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
  }
})

Re: ReadOnly Task

Posted: Mon Aug 13, 2018 12:27 pm
by Dev_Coppelis
readonly.png
readonly.png (81.38 KiB) Viewed 2693 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

Re: ReadOnly Task

Posted: Tue Aug 14, 2018 1:26 pm
by mats
Ok that's different logic than what we intend to support I'm afraid. Try using the override provided above.