diff --git a/htdocs/projet/class/api_tasks.class.php b/htdocs/projet/class/api_tasks.class.php index 49a5d9d418b..5c1dae46822 100644 --- a/htdocs/projet/class/api_tasks.class.php +++ b/htdocs/projet/class/api_tasks.class.php @@ -545,7 +545,7 @@ class Tasks extends DolibarrApi $this->task->timespent_datehour = $newdate; $this->task->timespent_withhour = 1; $this->task->timespent_duration = $duration; - $this->task->timespent_fk_user = $user_id; + $this->task->timespent_fk_user = $uid; $this->task->timespent_note = $note; $result = $this->task->addTimeSpent(DolibarrApiAccess::$user, 0);