summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-08-12 22:17:01 -0400
committerFrederic Guillot <fred@kanboard.net>2015-08-12 22:17:01 -0400
commit8d43897e26d0979184978ee731331e051fb086ed (patch)
treeca67e7c89574e83aa2c6c0468fabf97453e150ef /app/Model
parent94abf4f4d6655e96c4448eb287eaaebce85f77ef (diff)
Fix bug task estimate is reseted when using subtask timer
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/SubtaskTimeTracking.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/Model/SubtaskTimeTracking.php b/app/Model/SubtaskTimeTracking.php
index 9f17ee3f..8f8aac94 100644
--- a/app/Model/SubtaskTimeTracking.php
+++ b/app/Model/SubtaskTimeTracking.php
@@ -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();
}
/**