* adjust for edit effort.
This commit is contained in:
+6
-12
@@ -1038,12 +1038,9 @@ class task extends control
|
||||
return print(js::error(dao::getError()));
|
||||
}
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
$act = $this->post->left == 0 ? 'Finished' : 'Started';
|
||||
$actionID = $this->action->create('task', $taskID, $act, $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
$act = $this->post->left == 0 ? 'Finished' : 'Started';
|
||||
$actionID = $this->action->create('task', $taskID, $act, $this->post->comment);
|
||||
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
|
||||
|
||||
$this->executeHooks($taskID);
|
||||
$this->loadModel('common')->syncPPEStatus($taskID);
|
||||
@@ -1447,12 +1444,9 @@ class task extends control
|
||||
$changes = $this->task->start($taskID);
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
$act = $this->post->left == 0 ? 'Finished' : 'Restarted';
|
||||
$actionID = $this->action->create('task', $taskID, $act, $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
$act = $this->post->left == 0 ? 'Finished' : 'Restarted';
|
||||
$actionID = $this->action->create('task', $taskID, $act, $this->post->comment);
|
||||
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
|
||||
|
||||
$this->executeHooks($taskID);
|
||||
|
||||
|
||||
@@ -1744,7 +1744,7 @@ class taskModel extends model
|
||||
$estimate->account = $this->app->user->account;
|
||||
$estimate->consumed = (!empty($oldTask->team) and $currentTeam) ? $estimate->consumed - $currentTeam->consumed : $estimate->consumed - $oldTask->consumed;
|
||||
if($this->post->comment) $estimate->work = $this->post->comment;
|
||||
$estimateID = $this->addTaskEstimate($estimate);
|
||||
if($estimate->consumed > 0) $estimateID = $this->addTaskEstimate($estimate);
|
||||
|
||||
if(!empty($oldTask->team) and $currentTeam)
|
||||
{
|
||||
@@ -1754,7 +1754,7 @@ class taskModel extends model
|
||||
$team->status = empty($team->left) ? 'done' : 'doing';
|
||||
|
||||
$this->dao->update(TABLE_TASKTEAM)->data($team)->where('id')->eq($currentTeam->id)->exec();
|
||||
if($oldTask->mode == 'linear') $this->updateEstimateOrder($estimateID, $currentTeam->order);
|
||||
if($oldTask->mode == 'linear' and !empty($estimateID)) $this->updateEstimateOrder($estimateID, $currentTeam->order);
|
||||
|
||||
$task = $this->computeHours4Multiple($oldTask, $task);
|
||||
if($team->status == 'done')
|
||||
@@ -2885,7 +2885,7 @@ class taskModel extends model
|
||||
$today = helper::today();
|
||||
|
||||
if($estimate->date > $today) return dao::$errors[] = $this->lang->task->error->date;
|
||||
if($estimate->consumed < 0) return dao::$errors[] = sprintf($this->lang->error->ge, $this->lang->task->record, '0');
|
||||
if($estimate->consumed <= 0) return dao::$errors[] = sprintf($this->lang->error->ge, $this->lang->task->record, '0');
|
||||
if($estimate->left < 0) return dao::$errors[] = sprintf($this->lang->error->ge, $this->lang->task->left, '0');
|
||||
|
||||
$task = $this->getById($oldEstimate->objectID);
|
||||
|
||||
Reference in New Issue
Block a user