From bfe516f0c51721385cb60b30d7d2baddb4f34e15 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Tue, 29 Apr 2025 06:22:33 +0000 Subject: [PATCH] * [task#142680,done,0.5h] finish task. --- module/execution/model.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 8f70a74b60..6c24c21e3d 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -544,13 +544,14 @@ class executionModel extends model public function batchChangeStatus(array $executionIdList, string $status): array { /* Sort the IDs, the child stage comes first, and the parent stage follows. */ - $executionList = $this->dao->select('id,name,status,deliverable')->from(TABLE_EXECUTION)->where('id')->in($executionIdList)->orderBy('grade_desc')->fetchAll('id'); + $executionList = $this->dao->select('id,name,status,grade,deliverable')->from(TABLE_EXECUTION)->where('id')->in($executionIdList)->orderBy('grade_desc')->fetchAll('id'); $this->loadModel('programplan'); $message = array('byChild' => '', 'byDeliverable' => ''); foreach($executionList as $executionID => $execution) { - if(in_array($this->config->edition, array('max', 'ipd')) && $status == 'closed' && $execution->status == 'doing' && !$this->canCloseByDeliverable($execution)) + $needCheckDeliverable = $status == 'closed' && $execution->status == 'doing' && $execution->grade == 1; + if(in_array($this->config->edition, array('max', 'ipd')) && $needCheckDeliverable && !$this->canCloseByDeliverable($execution)) { $message['byDeliverable'] .= '#' . $execution->id . ' ' . $execution->name . "\n"; continue;