Hi guys,
I'm trying to get the following piece of code working.
Since workflow has a bug for updating all project tasks of a project (when some trigger occurs), I am trying to write a logic hook to do it instead. My code is as follows:
(In my logic_hook for the Project module)
$allProjectTasks = $bean->getAllProjectTasks();
foreach ($allProjectTasks as $task) {
$task->status = 'Completed';
$task->save();
}
Now, I know that each bean is being returned as I can check that $task->name for example, returns the task name. However I cannot get each returned task to then get updated with the new status.
I know I'm doing something stupid here - please help
Thanks,
Michael


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks