* code for task#1478.
This commit is contained in:
@@ -448,7 +448,8 @@ class task extends control
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
$actionID = $this->action->create('task', $taskID, 'Started', $this->post->comment);
|
||||
$act = $this->post->left == 0 ? 'Finished' : 'Started';
|
||||
$actionID = $this->action->create('task', $taskID, $act, $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->sendmail($taskID, $actionID);
|
||||
}
|
||||
|
||||
+10
-1
@@ -384,12 +384,21 @@ class taskModel extends model
|
||||
if($this->post->consumed < $oldTask->consumed) die(js::error($this->lang->task->error->consumedSmall));
|
||||
$now = helper::now();
|
||||
$task = fixer::input('post')
|
||||
->setDefault('status', 'doing')
|
||||
->setDefault('assignedTo', $this->app->user->account)
|
||||
->setDefault('assignedDate', $now)
|
||||
->setDefault('lastEditedBy', $this->app->user->account)
|
||||
->setDefault('lastEditedDate', $now)
|
||||
->remove('comment')->get();
|
||||
if($this->post->left == 0)
|
||||
{
|
||||
$task->status = 'done';
|
||||
$task->finishedBy = $this->app->user->account;
|
||||
$task->finishedDate = helper::now();
|
||||
}
|
||||
else
|
||||
{
|
||||
$task->status = 'doing';
|
||||
}
|
||||
$this->setStatus($task);
|
||||
|
||||
$this->dao->update(TABLE_TASK)->data($task)
|
||||
|
||||
Reference in New Issue
Block a user