From 357581137eb13dbabedcb8e35b61cbd40b07c1fe Mon Sep 17 00:00:00 2001 From: liugang Date: Fri, 8 Dec 2023 15:38:51 +0800 Subject: [PATCH] * testtaskModel: change the type of the third parameter of the getPairs method to int. --- module/bug/zen.php | 2 +- module/testtask/model.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module/bug/zen.php b/module/bug/zen.php index d03821872a..8dd3f78c09 100644 --- a/module/bug/zen.php +++ b/module/bug/zen.php @@ -1280,7 +1280,7 @@ class bugZen extends bug $this->view->plans = $this->loadModel('productplan')->getPairs($bug->product, $bug->branch, '', true); $this->view->stories = $bug->execution ? $this->story->getExecutionStoryPairs($bug->execution) : $this->story->getProductStoryPairs($bug->product, $bug->branch, 0, 'all', 'id_desc', 0, 'full', 'story', false); $this->view->tasks = $this->task->getExecutionTaskPairs($bug->execution); - $this->view->testtasks = $this->loadModel('testtask')->getPairs($bug->product, $bug->execution, (string)$bug->testtask); + $this->view->testtasks = $this->loadModel('testtask')->getPairs($bug->product, $bug->execution, $bug->testtask); $this->view->cases = $cases; $this->view->users = $this->user->getPairs('noclosed', "$bug->assignedTo,$bug->resolvedBy,$bug->closedBy,$bug->openedBy"); $this->view->actions = $this->loadModel('action')->getList('bug', $bug->id); diff --git a/module/testtask/model.php b/module/testtask/model.php index 86c027c2fe..656cb26efe 100755 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -198,13 +198,13 @@ class testtaskModel extends model * 获取测试单键值对。 * Get key-value pairs of testtask. * - * @param int $productID - * @param int $executionID - * @param string|array $appendIdList + * @param int $productID + * @param int $executionID + * @param int $appendTaskID * @access public * @return array */ - public function getPairs(int $productID, int $executionID = 0, string|array $appendIdList = ''): array + public function getPairs(int $productID, int $executionID = 0, int $appendTaskID = 0): array { $pairs = $this->dao->select('id, name')->from(TABLE_TESTTASK) ->where('deleted')->eq('0') @@ -214,7 +214,7 @@ class testtaskModel extends model ->orderBy('id_desc') ->fetchPairs(); - if($appendIdList) $pairs += $this->dao->select('id, name')->from(TABLE_TESTTASK)->where('id')->in($appendIdList)->andWhere('auto')->ne('unit')->fetchPairs(); + if($appendTaskID) $pairs += $this->dao->select('id, name')->from(TABLE_TESTTASK)->where('id')->eq($appendTaskID)->andWhere('auto')->ne('unit')->fetchPairs(); return $pairs; }