* testtaskModel: change the type of the third parameter of the getPairs method to int.

This commit is contained in:
liugang
2023-12-08 15:38:51 +08:00
parent ff935912f9
commit 357581137e
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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);
+5 -5
View File
@@ -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;
}