From c2635f5242e39bfeedf5b6d491d4c7e06d6bfe73 Mon Sep 17 00:00:00 2001 From: Florian Mortgat <50440633+atm-florianm@users.noreply.github.com> Date: Mon, 24 Nov 2025 16:32:27 +0100 Subject: [PATCH] FIX 17.0: perweek.php resets task progress to 0% when: (#36401) * FIX 17.0: perweek.php resets task progress to 0% when: 1. the column "Declared real progress" is hidden (which means the corresponding form inputs won't be displayed) 2. and the user doesn't enter any time for that task (= leaves the input empty) If the column is shown, the bug doesn't occur because the correct value is sent with $_POST. If the user enters time, the bug doesn't occur because there is a GETPOSTISSET test for that case. * Apply suggestion from @atm-florianm variable name ($taskid vs $tmptaskid) --- htdocs/projet/activity/perweek.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index f39f96a6778..7a69b1c47e4 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -307,7 +307,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilterac } } - if (!$updateoftaskdone) { // Check to update progress if no update were done on task. + if (!$updateoftaskdone && GETPOSTISSET($taskid.'progress')) { // Check to update progress if no update were done on task. $object->fetch($taskid); //var_dump($object->progress); //var_dump(GETPOST($taskid . 'progress', 'int')); exit;