From 8a48cd5989e87c9578ccdaaadccbb6fb07367ade Mon Sep 17 00:00:00 2001 From: NASDAMI Quatadah Date: Thu, 9 Jun 2022 12:05:23 +0200 Subject: [PATCH 1/2] 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"); From fb86cea3fcb5b4024e85f6c41ecbf242398d2c90 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 9 Jun 2022 10:09:49 +0000 Subject: [PATCH 2/2] Fixing style errors. --- htdocs/projet/tasks/time.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 0fb54aa1a48..08d44ffcbd8 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -247,7 +247,7 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us if (!$error) { if (GETPOST('taskid', 'int') != $id) { // GETPOST('taskid') is id of new task $id_temp = GETPOST('taskid', 'int'); // should not overwrite $id - + $object->fetchTimeSpent(GETPOST('lineid', 'int'));