* [perf story #69159] display consumed and left fields for restart parent task.

This commit is contained in:
wangyidong
2024-11-07 09:09:01 +08:00
committed by 孙广明
parent d998fc528b
commit 87f5637648
2 changed files with 7 additions and 2 deletions
+3 -1
View File
@@ -325,7 +325,9 @@ class taskModel extends model
if($oldTask->parent > 0) $this->computeBeginAndEnd($oldTask->parent);
/* Create related dynamic and record. */
$action = $left == 0 ? 'Finished' : 'Started';
$action = 'Started';
if($oldTask->status == 'pause') $action = 'Restarted';
if($left == 0) $action = 'Finished';
$this->afterChangeStatus($oldTask, $changes, $action, $output);
/* Send Webhook notifications and synchronize status to execution, project and program. */
+4 -1
View File
@@ -99,9 +99,10 @@ else
(
set::name('consumed'),
set::value(!empty($currentTeam) ? (float)$currentTeam->consumed : $task->consumed),
set::disabled(!empty($currentTeam) ? true : false),
set::disabled((!empty($currentTeam) || $task->isParent) ? true : false),
),
!empty($currentTeam) ? formHidden('consumed', (float)$currentTeam->consumed) : null,
$task->isParent ? formHidden('consumed', (float)$task->consumed) : null,
to::suffix($lang->task->suffixHour),
set::suffixWidth(20)
)
@@ -116,7 +117,9 @@ else
(
set::name('left'),
set::value(!empty($currentTeam) ? (float)$currentTeam->left : $task->left),
set::disabled($task->isParent ? true : false),
),
$task->isParent ? formHidden('left', $task->left) : null,
to::suffix($lang->task->suffixHour),
set::suffixWidth(20)
)