From 84dd5756e1da423ef6eaebd023f4f3b8f847891b Mon Sep 17 00:00:00 2001 From: sunguangming Date: Sat, 23 Dec 2023 13:48:59 +0800 Subject: [PATCH] * Fix bug #42232. --- module/execution/model.php | 1 + module/programplan/model.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/execution/model.php b/module/execution/model.php index 6e83a61e25..9b865d6297 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1646,6 +1646,7 @@ class executionModel extends model foreach($executions as $execution) { $execution->productName = isset($productList[$execution->id]) ? trim($productList[$execution->id]->productName, ',') : ''; + $execution->product = $productID; if($execution->end) $execution->end = date(DT_DATE1, strtotime($execution->end)); if(isset($executions[$execution->parent])) $executions[$execution->parent]->isParent = 1; diff --git a/module/programplan/model.php b/module/programplan/model.php index 88e6a53de4..7cb3a8f315 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -527,7 +527,7 @@ class programplanModel extends model /* Check weather need to set code and compute same code. */ $setCode = isset($this->config->setCode) && $this->config->setCode == 1; - $sameCodes = $setCode ? $this->checkCodeUnique($codes, isset($planIDList) ? $planIDList : '') : false; + $sameCodes = $setCode ? $this->checkCodeUnique($code, isset($planIDList) ? $planIDList : '') : false; /* Prepare the plans user inputted. Process the plan which names not empty only. */ $project = $this->loadModel('project')->getByID($projectID);