Fix bug task estimate is reseted when using subtask timer

This commit is contained in:
Frederic Guillot
2015-08-12 22:17:01 -04:00
parent 94abf4f4d6
commit 8d43897e26
5 changed files with 24 additions and 22 deletions

View File

@@ -301,7 +301,6 @@ class SubtaskTimeTracking extends Base
->findOneColumn('start');
if ($start_time) {
$start = new DateTime;
$start->setTimestamp($start_time);
@@ -349,10 +348,9 @@ class SubtaskTimeTracking extends Base
return $this->db
->table(Task::TABLE)
->eq('id', $task_id)
->update(array(
'time_spent' => $result['total_spent'],
'time_estimated' => $result['total_estimated'],
));
->sumColumn('time_spent', $result['total_spent'])
->sumColumn('time_estimated', $result['total_estimated'])
->update();
}
/**