From 378c8c46914e02d9eb62c5ab86b62cf917263472 Mon Sep 17 00:00:00 2001 From: Matt Sidnell <54064522+pstructures@users.noreply.github.com> Date: Sun, 12 Jul 2020 20:34:04 +0100 Subject: [PATCH 1/2] Error on time pent page where progress was getting unset --- htdocs/projet/activity/perweek.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index f3a68dd979f..5e5ae809326 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -292,7 +292,6 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilterac $object->fetch($taskid); if (GETPOSTISSET($taskid.'progress')) $object->progress = GETPOST($taskid.'progress', 'int'); - else unset($object->progress); $object->timespent_duration = $newduration; $object->timespent_fk_user = $usertoprocess->id; From 2797c5e65f46ca7df8bdbcadc5f653d0f9d5f870 Mon Sep 17 00:00:00 2001 From: Matt Sidnell <54064522+pstructures@users.noreply.github.com> Date: Sun, 12 Jul 2020 21:21:34 +0100 Subject: [PATCH 2/2] Updated Issue with declared progress --- htdocs/projet/activity/perday.php | 2 +- htdocs/projet/activity/perweek.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index 41def74cf1d..8ba7b0c3d93 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -285,7 +285,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilterac foreach ($timespent_duration as $key => $val) { $object->fetch($key); - + $taskid = $object->id; if (GETPOSTISSET($taskid.'progress')) $object->progress = GETPOST($taskid.'progress', 'int'); else unset($object->progress); diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index 5e5ae809326..f3a68dd979f 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -292,6 +292,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilterac $object->fetch($taskid); if (GETPOSTISSET($taskid.'progress')) $object->progress = GETPOST($taskid.'progress', 'int'); + else unset($object->progress); $object->timespent_duration = $newduration; $object->timespent_fk_user = $usertoprocess->id;