Merge pull request #21178 from Quatadah/fix19860

FIX  #19860
This commit is contained in:
Laurent Destailleur 2022-06-09 12:51:19 +02:00 committed by GitHub
commit 2ad7c0df74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -246,7 +246,8 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us
if (!$error) { if (!$error) {
if (GETPOST('taskid', 'int') != $id) { // GETPOST('taskid') is id of new task 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')); $object->fetchTimeSpent(GETPOST('lineid', 'int'));
@ -255,7 +256,7 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us
$result = $object->delTimeSpent($user); $result = $object->delTimeSpent($user);
} }
$object->fetch($id, $ref); $object->fetch($id_temp, $ref);
$object->timespent_note = GETPOST("timespent_note_line", 'alpha'); $object->timespent_note = GETPOST("timespent_note_line", 'alpha');
$object->timespent_old_duration = GETPOST("old_duration"); $object->timespent_old_duration = GETPOST("old_duration");