예제 #1
0
 if (!$obj->bind($_POST)) {
     $AppUI->setMsg($obj->getError(), UI_MSG_ERROR);
     $AppUI->redirect();
 }
 if ($rm && $del) {
     $overAssignment = $obj->updateAssigned($hassign, $hperc_assign_ar, true, true);
     if ($overAssignment) {
         $AppUI->setMsg('Some Users could not be unassigned from Task', UI_MSG_ERROR);
     } else {
         // Don't do anything because we might have other tasks to change
         // $AppUI->setMsg('User(s) unassigned from Task', UI_MSG_OK);
         // $AppUI->redirect();
     }
 } else {
     if ($rm || $del) {
         if ($msg = $obj->removeAssigned($user_id)) {
             $AppUI->setMsg($msg, UI_MSG_ERROR);
         } else {
             $AppUI->setMsg('User unassigned from Task', UI_MSG_OK);
         }
     }
 }
 if (isset($hassign) && !$del == 1) {
     $overAssignment = $obj->updateAssigned($hassign, $hperc_assign_ar, false, false);
     //check if OverAssignment occured, database has not been updated in this case
     if ($overAssignment) {
         $AppUI->setMsg('The following Users have not been assigned in order to prevent' . ' from Over-Assignment:', UI_MSG_ERROR);
         $AppUI->setMsg('<br />' . $overAssignment, UI_MSG_ERROR, true);
     } else {
         $AppUI->setMsg('User(s) assigned to Task', UI_MSG_OK);
     }
예제 #2
0
     $upd_task = new CTask();
     $upd_task->load($key);
     if ($upd_task->task_id) {
         $upd_task->updateAssigned($bulk_task_assign, $hperc_assign_ar, false, false);
     }
     //$upd_task->updateAssigned($bulk_task_assign,array($bulk_task_assign=>$bulk_task_assign_perc),false,false);
     if ($upd_task->task_project && $upd_task->task_id && $upd_task->task_notify) {
         $upd_task->notify();
     }
 }
 //Action: Unassign User
 if (isset($_POST['bulk_task_unassign']) && $bulk_task_unassign != '') {
     $upd_task = new CTask();
     $upd_task->load($key);
     if ($upd_task->task_id) {
         $upd_task->removeAssigned($bulk_task_unassign);
     }
 }
 // Action: Allow user to add task logs for others
 if (isset($_POST['bulk_task_allow_other_user_tasklogs']) && $bulk_task_allow_other_user_tasklogs != '') {
     $upd_task = new CTask();
     $upd_task->load($key);
     if ($upd_task->task_id) {
         $upd_task->task_allow_other_user_tasklogs = $bulk_task_allow_other_user_tasklogs;
         $result = $upd_task->store($AppUI);
         if (is_array($result)) {
             break;
         }
     }
 }
 //Action: Other Actions