diff --git a/module/my/css/testtask.css b/module/my/css/testtask.css index 124ef6e446..2f13e9acfb 100644 --- a/module/my/css/testtask.css +++ b/module/my/css/testtask.css @@ -1 +1,5 @@ -.c-execution, .c-build {width: 120px;} +.c-execution {width: 200px} +.c-build {width: 120px;} +.c-id {width: 60px;} +.c-status {width: 80px;} +.table-fixed td {text-overflow: ellipsis;} diff --git a/module/my/view/testtask.html.php b/module/my/view/testtask.html.php index 4c7e9b1a19..9df1becf44 100644 --- a/module/my/view/testtask.html.php +++ b/module/my/view/testtask.html.php @@ -47,12 +47,12 @@ id);?> - createLink('testtask', 'view', "taskID=$task->id"), $task->name);?> - executionName?> - build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName));?> + createLink('testtask', 'view', "taskID=$task->id"), $task->name);?> + executionName;?> + trunk : $task->buildName;?>'>build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName));?> begin?> end?> - processStatus('testtask', $task);?> + '>processStatus('testtask', $task);?> id", $task, 'list', 'sitemap', '', '', '', "data-app='qa'"); diff --git a/module/testtask/css/browse.css b/module/testtask/css/browse.css index c68ac80a50..fb5f060737 100644 --- a/module/testtask/css/browse.css +++ b/module/testtask/css/browse.css @@ -1,3 +1,5 @@ #taskList tbody>tr>td, #taskList thead>tr>th {white-space: nowrap;} td {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} .c-name {width: 200px;} +.c-id {width: 60px;} +.c-user, .c-status {width: 80px;} diff --git a/module/testtask/model.php b/module/testtask/model.php index f2aadcbb32..029545908c 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -76,11 +76,13 @@ class testtaskModel extends model $products = $scopeAndStatus[0] == 'all' ? $this->app->user->view->products : array(); $branch = $scopeAndStatus[0] == 'all' ? 'all' : $branch; - return $this->dao->select("t1.*, t2.name AS productName, t3.name AS executionName, t4.name AS buildName, t4.branch AS 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") ->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') ->leftJoin(TABLE_BUILD)->alias('t4')->on('t1.build = t4.id') + ->leftJoin(TABLE_PROJECT)->alias('t5')->on('t3.project = t5.id') ->where('t1.deleted')->eq(0) ->andWhere('t1.auto')->ne('unit') @@ -294,11 +296,13 @@ class testtaskModel extends model */ public function getByUser($account, $pager = null, $orderBy = 'id_desc', $type = '') { - return $this->dao->select('t1.*, t2.name AS executionName, t3.name AS buildName') + $executionNameField = $this->config->systemMode == 'new' ? "IF(t5.id IS NOT NULL, CONCAT(t5.name, ' / ', t2.name), t2.name)" : 't2.name'; + return $this->dao->select("t1.*, $executionNameField AS executionName, t3.name AS buildName") ->from(TABLE_TESTTASK)->alias('t1') ->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.execution = t2.id') ->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build = t3.id') ->leftJoin(TABLE_PRODUCT)->alias('t4')->on('t1.product = t4.id') + ->leftJoin(TABLE_PROJECT)->alias('t5')->on('t2.project = t5.id') ->where('t1.deleted')->eq(0) ->andWhere('t4.deleted')->eq(0) ->andWhere('t1.auto')->ne('unit')