From d424236ba956cb58b52c38bab45fbe724385b61a Mon Sep 17 00:00:00 2001 From: wangyuting Date: Thu, 8 Jun 2023 10:36:55 +0800 Subject: [PATCH] * Fix get project testtask function bug. --- module/testtask/model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/testtask/model.php b/module/testtask/model.php index 8896df02b8..0e7dbf9f4d 100755 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -189,11 +189,12 @@ class testtaskModel extends model */ public function getProjectTasks($projectID, $orderBy = 'id_desc', $pager = null) { - $tasks = $this->dao->select('t1.*, t2.name AS buildName, t3.name as executionName, t4.name AS productName') + $tasks = $this->dao->select('t1.*, t5.multiple, IF(t4.shadow = 1, t5.name, t4.name) AS productName, t3.name as executionName, t2.name AS buildName, t2.branch AS branch, t5.name AS projectName') ->from(TABLE_TESTTASK)->alias('t1') ->leftJoin(TABLE_BUILD)->alias('t2')->on('t1.build = t2.id') ->leftJoin(TABLE_EXECUTION)->alias('t3')->on('t1.execution = t3.id') ->leftJoin(TABLE_PRODUCT)->alias('t4')->on('t1.product = t4.id') + ->leftJoin(TABLE_PROJECT)->alias('t5')->on('t3.project = t5.id') ->where('t1.project')->eq((int)$projectID) ->andWhere('t1.auto')->ne('unit') ->andWhere('t1.deleted')->eq(0)