From aee6f408b255d40db1d46ad87a33ff88e6c15fe5 Mon Sep 17 00:00:00 2001 From: kamel Date: Wed, 11 May 2022 09:30:39 +0200 Subject: [PATCH] FIX: Set datec when add time spent on a project task --- htdocs/projet/class/task.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 8d9f91afaca..cda8494682b 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1144,6 +1144,7 @@ class Task extends CommonObject dol_syslog(get_class($this)."::addTimeSpent", LOG_DEBUG); $ret = 0; + $now = dol_now(); // Check parameters if (!is_object($user)) { @@ -1169,6 +1170,7 @@ class Task extends CommonObject $sql .= ", task_duration"; $sql .= ", fk_user"; $sql .= ", note"; + $sql .= ", datec"; $sql .= ") VALUES ("; $sql .= $this->id; $sql .= ", '".$this->db->idate($this->timespent_date)."'"; @@ -1177,6 +1179,7 @@ class Task extends CommonObject $sql .= ", ".$this->timespent_duration; $sql .= ", ".$this->timespent_fk_user; $sql .= ", ".(isset($this->timespent_note) ? "'".$this->db->escape($this->timespent_note)."'" : "null"); + $sql .= ", '".$this->db->idate($now)."'"; $sql .= ")"; $resql = $this->db->query($sql);