Esempio n. 1
0
 public function shiftDependentTasks()
 {
     // Get tasks that depend on this task
     $csDeps = explode(',', $this->dependentTasks('', '', false));
     if ($csDeps[0] == '') {
         return;
     }
     // Stage 1: Update dependent task dates
     foreach ($csDeps as $task_id) {
         $this->update_dep_dates($task_id);
     }
     // Stage 2: Now shift the dependent tasks' dependents
     foreach ($csDeps as $task_id) {
         $newTask = new CTask();
         $newTask->load($task_id);
         $newTask->shiftDependentTasks();
     }
     return;
 }
Esempio n. 2
0
             $q->setDelete('task_dependencies');
             $q->addWhere('dependencies_task_id=' . $upd_task->task_id);
             $q->exec();
         } elseif (!($bulk_task_dependency == $upd_task->task_id)) {
             $upd_task->task_dynamic = 31;
             $upd_task->store($AppUI);
             $q = new w2p_Database_Query();
             $q->addTable('task_dependencies');
             $q->addReplace('dependencies_task_id', $upd_task->task_id);
             $q->addReplace('dependencies_req_task_id', $bulk_task_dependency);
             $q->exec();
             //Lets recalc the dependency
             $dep_task = new CTask();
             $dep_task->load($bulk_task_dependency);
             if ($dep_task->task_id) {
                 $dep_task->shiftDependentTasks();
             }
         }
     }
 }
 //Action: Modify priority
 if (isset($_POST['bulk_task_priority']) && $bulk_task_priority != '') {
     if ($upd_task->task_id) {
         $upd_task->task_priority = $bulk_task_priority;
         $result = $upd_task->store($AppUI);
         if (is_array($result)) {
             break;
         }
     }
 }
 //Action: Modify Access