diff --git a/module/task/model.php b/module/task/model.php index 05c7217e63..efba27c99e 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -809,7 +809,7 @@ class taskModel extends model } else { - if($team[$oldTask->assignedTo]->left == 0 && $team[$oldTask->assignedTo]->consumed != 0) + if($team[$oldTask->assignedTo]->left == 0 and $team[$oldTask->assignedTo]->consumed != 0 and $this->app->rawMethod != 'deleteestimate') { if($oldTask->assignedTo != $teams[count($teams) - 1]) { @@ -3738,6 +3738,7 @@ class taskModel extends model public function getFinishedUsers($taskID = 0, $team = array()) { $task = $this->getById($taskID); + if($task->activatedDate == '') $task->activatedDate = "0000-00-00"; return $this->dao->select('actor')->from(TABLE_ACTION) ->where('objectType')->eq('task') ->andWhere('objectID')->eq($taskID) diff --git a/module/task/view/recordestimate.html.php b/module/task/view/recordestimate.html.php index cf1e5d976d..cfb3432d34 100644 --- a/module/task/view/recordestimate.html.php +++ b/module/task/view/recordestimate.html.php @@ -60,7 +60,7 @@ team) or $task->assignedTo == $this->app->user->account or ($task->mode == 'multi' and isset($task->team[$app->user->account]))):?> app->user->admin or $this->app->user->account == $estimate->account) + if($this->app->user->account == $estimate->account) { common::printIcon('task', 'editEstimate', "estimateID=$estimate->id", '', 'list', 'pencil', '', 'showinonlybody', true); common::printIcon('task', 'deleteEstimate', "estimateID=$estimate->id", '', 'list', 'close', 'hiddenwin', 'showinonlybody');