From 8a48cd5989e87c9578ccdaaadccbb6fb07367ade Mon Sep 17 00:00:00 2001 From: NASDAMI Quatadah Date: Thu, 9 Jun 2022 12:05:23 +0200 Subject: [PATCH] Fixing bug --- htdocs/projet/tasks/time.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index ef8ac6aa9df..0fb54aa1a48 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -246,7 +246,8 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us if (!$error) { if (GETPOST('taskid', 'int') != $id) { // GETPOST('taskid') is id of new task - $id = GETPOST('taskid', 'int'); + $id_temp = GETPOST('taskid', 'int'); // should not overwrite $id + $object->fetchTimeSpent(GETPOST('lineid', 'int')); @@ -255,7 +256,7 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us $result = $object->delTimeSpent($user); } - $object->fetch($id, $ref); + $object->fetch($id_temp, $ref); $object->timespent_note = GETPOST("timespent_note_line", 'alpha'); $object->timespent_old_duration = GETPOST("old_duration");