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)
This commit is contained in:
antonin_tdj 2022-11-25 23:44:32 +01:00 committed by GitHub
parent ac13768395
commit 59ec20f549
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);