Hi,
I've a task template and according which i'm creating the task through the addSubtask(), but i can't add dependency of that task.
How can i add a dependency when i'm creating a task through addSubtask().
Please help me in that issue.
Thanks
Dhrubo
Support Forum
Suppose i've created a task through subtask.
i need to add dependency of that task.
Is this clear ?
Thanks
Dhrubo
test = task.addSubtask(new gantt.taskStore.model({
Name : key.task_name,
leaf : true,
PercentDone : 0,
StartDate : finish_dates[key.predecessor].enddate,
//FinishDate : date.getDate() + parseInt(key.duration),
Duration : key.duration
//addSuccessor : dependency
})
Is this clear ?
Thanks
Dhrubo
hi,
Thanks for your code.
I've added that block of code after creating subtask.
Now problem is that, dependency is showing that time(when i press zoom to fit), but not storing to the database, as a result, when i refresh the script, then dependency is not showing.
But if i put an alert after the addSubtask, then dependency is storing in the database.
Do you have any idea about that?
Again Thanks
Dhrubo
Thanks for your code.
I've added that block of code after creating subtask.
Now problem is that, dependency is showing that time(when i press zoom to fit), but not storing to the database, as a result, when i refresh the script, then dependency is not showing.
But if i put an alert after the addSubtask, then dependency is storing in the database.
Do you have any idea about that?
Again Thanks
Dhrubo
Hi,
Sorry for the late response.
I figured out that problem and solved.
Now i'm facing another problem.
here is my code scenario:
i've added a subtask here. How can i get the id of the task?
I've tried with 'test.data.index' but this is not giving me the corresponding id all the time.
Please help me.
Thanks
Dhrubo
Sorry for the late response.
I figured out that problem and solved.
Now i'm facing another problem.
here is my code scenario:
test = task.addSubtask(new gantt.taskStore.model({
Name : key.task_name,
leaf : true,
PercentDone : 0,
StartDate : finish_dates[key.predecessor].enddate,
//FinishDate : date.getDate() + parseInt(key.duration),
Duration : key.duration
//addSuccessor : dependency
})
I've tried with 'test.data.index' but this is not giving me the corresponding id all the time.
Please help me.
Thanks
Dhrubo
Hi,
Thanks for your prompt answer.
i've written down this line like this:
But the alert is showing my 'undefined'. Do you know why?
Waiting for your kind response.
thanks
dhrubo
Thanks for your prompt answer.
i've written down this line like this:
test = task.addSubtask(new gantt.taskStore.model({
Name : key.task_name,
leaf : true,
PercentDone : 0,
StartDate : finish_dates[key.predecessor].enddate,
//FinishDate : date.getDate() + parseInt(key.duration),
Duration : key.duration
//addSuccessor : dependency
})
);
alert(test.get("Id"));
Waiting for your kind response.
thanks
dhrubo