* Use the product's name instead of the product's name if the product is a shadow one.

This commit is contained in:
liugang
2022-09-20 17:50:07 +08:00
parent 43e8fd4bca
commit cb9c662a97
3 changed files with 8 additions and 3 deletions

View File

@@ -77,7 +77,7 @@ class testtaskModel extends model
$branch = $scopeAndStatus[0] == 'all' ? 'all' : $branch;
$executionNameField = $this->config->systemMode == 'new' ? "IF(t5.id IS NOT NULL, CONCAT(t5.name, ' / ', t3.name), t3.name)" : 't3.name';
return $this->dao->select("t1.*, t2.name AS productName, $executionNameField AS executionName, t4.name AS buildName, t4.branch AS branch")
return $this->dao->select("t1.*, IF(t2.shadow = 1, t5.name, t2.name) AS productName, $executionNameField AS executionName, t4.name AS buildName, t4.branch AS branch")
->from(TABLE_TESTTASK)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
->leftJoin(TABLE_EXECUTION)->alias('t3')->on('t1.execution = t3.id')