From 0c7767c3c5006db4d9d42969818368ce58fdaf8b Mon Sep 17 00:00:00 2001 From: sunjun Date: Wed, 13 Jul 2022 04:31:32 +0000 Subject: [PATCH] 60474 --- module/task/control.php | 9 ++++++++- module/task/model.php | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/module/task/control.php b/module/task/control.php index f402a61a62..05af389d0b 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -1226,7 +1226,14 @@ class task extends control $actionID = $this->loadModel('action')->create('task', $estimate->task, 'Adjusttasktowait'); $this->action->logHistory($actionID, $changes); } - return print(js::reload('parent')); + if($task->consumed - $estimate->consumed == 0) + { + return print(js::reload('parent.parent')); + } + else + { + return print(js::reload('parent')); + } } } diff --git a/module/task/model.php b/module/task/model.php index 937b5c4506..79bbafd0ba 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -833,7 +833,8 @@ class taskModel extends model $currentTask->consumed += (float)$member->consumed; $currentTask->left += (float)$member->left; } - if(empty($oldTask->team) and isset($oldTask->consumed)) $currentTask->consumed += (float)$oldTask->consumed; + + if($this->app->rawMethod == 'edit' and empty($oldTask->team) and isset($oldTask->consumed)) $currentTask->consumed += (float)$oldTask->consumed; if(!empty($task)) {