* Fix get project testtask function bug.

This commit is contained in:
wangyuting
2023-06-08 10:36:55 +08:00
parent c22b94ac98
commit d424236ba9
+2 -1
View File
@@ -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)