From cda31dd123182584be0dafe881cba842c42bdc80 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Thu, 26 Jun 2025 10:07:23 +0800 Subject: [PATCH 1/2] * [bug#63712,done,0.1h] check execution only in ipd. --- module/task/ui/edit.html.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/module/task/ui/edit.html.php b/module/task/ui/edit.html.php index 8564d71258..d13c70d06e 100644 --- a/module/task/ui/edit.html.php +++ b/module/task/ui/edit.html.php @@ -76,8 +76,12 @@ $hiddenTeam = $task->mode != '' ? '' : 'hidden'; $disabledEstStarted = $project && $project->taskDateLimit == 'limit' && !empty($parentTask) && helper::isZeroDate($parentTask->estStarted); $disabledDeadline = $project && $project->taskDateLimit == 'limit' && !empty($parentTask) && helper::isZeroDate($parentTask->deadline); -$execution->canStartExecution = $this->loadModel('execution')->checkStageStatus($execution->id, 'start'); -$task->executionInfo = $execution; +/* 检查是否可以开始执行。*/ +if($this->config->edition == 'ipd') +{ + $execution->canStartExecution = $this->loadModel('execution')->checkStageStatus($execution->id, 'start'); + $task->executionInfo = $execution; +} if($task->status == 'wait') unset($statusOptions['pause']); From ffd5c555bfa6c4ae7bb8d3efc7309372ade40a9c Mon Sep 17 00:00:00 2001 From: liumengyi Date: Thu, 26 Jun 2025 15:01:12 +0800 Subject: [PATCH 2/2] * [bug#63712,done,0.1h] optimize code for sonar. --- module/task/ui/edit.html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/task/ui/edit.html.php b/module/task/ui/edit.html.php index d13c70d06e..94b7de589d 100644 --- a/module/task/ui/edit.html.php +++ b/module/task/ui/edit.html.php @@ -124,6 +124,7 @@ detailHeader ) ); +$recordWorkhourDisabled = !empty($task->children) ? 'disabled' : ''; detailBody ( set::isForm(true), @@ -532,7 +533,7 @@ detailBody ), $this->task->isClickable($task, 'recordWorkhour') ? btn ( - setClass('ghost text-primary', !empty($task->children) ? 'disabled' : true), + setClass('ghost text-primary', $recordWorkhourDisabled), icon('time'), set::href(inlink('recordWorkhour', "id={$task->id}&from=edittask")), setData('toggle', 'modal')