From 82be7d9b7a428e430bb39fc97777366e6dc2fab5 Mon Sep 17 00:00:00 2001 From: atm-corentin Date: Tue, 7 Jan 2025 09:50:14 +0100 Subject: [PATCH] Fix the update of timespent --- htdocs/projet/tasks/time.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 737b856f99e..8d8ddaff6c8 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -286,9 +286,6 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us $object->fetchTimeSpent(GETPOST('lineid', 'int')); $result = 0; - if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { - $result = $object->delTimeSpent($user); - } $object->fetch($id_temp, $ref); @@ -309,7 +306,7 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us $result = 0; if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { - $result = $object->addTimeSpent($user); + $result = $object->updateTimeSpent($user); if ($result >= 0) { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); } else {