From e83da7c5244023f61e9cb804cd6532c450de5f4a Mon Sep 17 00:00:00 2001 From: liumengyi Date: Wed, 18 May 2022 11:15:21 +0800 Subject: [PATCH] * Fix bug for task #54336. --- module/execution/control.php | 2 +- module/execution/model.php | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index e89bd30f80..043bcef53a 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1452,7 +1452,7 @@ class execution extends control $this->view->name = $name; $this->view->code = $code; $this->view->team = $team; - $this->view->teams = array(0 => '') + $this->execution->getCanCopyObjects((int)$projectID); + $this->view->teams = array(0 => '', $projectID => $project->name) + $this->execution->getCanCopyObjects((int)$projectID); $this->view->allProjects = array(0 => '') + $this->project->getPairsByModel('all', 0, 'noclosed'); $this->view->executionID = $executionID; $this->view->productID = $productID; diff --git a/module/execution/model.php b/module/execution/model.php index 3a113138a2..689ec1dcfb 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2702,16 +2702,6 @@ class executionModel extends model if(empty($projectID) and $this->config->systemMode == 'new') return array(); $objectPairs = $this->dao->select('id,name')->from(TABLE_PROJECT) - ->where('deleted')->eq(0) - ->andWhere('type')->eq('project') - ->andWhere('(project')->eq($projectID) - ->orWhere('id')->eq($projectID) - ->markRight(1) - ->orderBy('openedDate_desc') - ->limit('9') - ->fetchPairs(); - - $objectPairs += $this->dao->select('id,name')->from(TABLE_PROJECT) ->where('deleted')->eq(0) ->andWhere('type')->ne('project') ->andWhere('(project')->eq($projectID)