From 59ec20f549200bca9a35b6823ebbdb72c4617c15 Mon Sep 17 00:00:00 2001 From: antonin_tdj <50403308+ibuiv@users.noreply.github.com> Date: Fri, 25 Nov 2022 23:44:32 +0100 Subject: [PATCH] Fix #20685 User Id not transmitted on Api addTimeSpent Fix #20685 User Id not transmitted on Api addTimeSpent The User ID will be transmitted to the API call (if 0 then, the user will be selected from API key) --- htdocs/projet/class/api_tasks.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);