Merge branch 'sprint/231_liumengyi_65780' into 'master'
* Finish task #65780. See merge request easycorp/zentaopms!5057
This commit is contained in:
@@ -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;}
|
||||
|
||||
@@ -47,12 +47,12 @@
|
||||
<?php foreach($tasks as $task):?>
|
||||
<tr>
|
||||
<td class="c-id"><?php printf('%03d', $task->id);?></td>
|
||||
<td class='text-left nobr'><?php echo html::a($this->createLink('testtask', 'view', "taskID=$task->id"), $task->name);?></td>
|
||||
<td class='nobr'><?php echo $task->executionName?></td>
|
||||
<td class='nobr' title='<?php echo $task->buildName;?>'><?php $task->build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName));?></td>
|
||||
<td class='text-left nobr' title='<?php echo $task->name;?>'><?php echo html::a($this->createLink('testtask', 'view', "taskID=$task->id"), $task->name);?></td>
|
||||
<td class='nobr' title='<?php echo $task->executionName;?>'><?php echo $task->executionName;?></td>
|
||||
<td class='nobr' title='<?php echo $task->build == 'trunk' ? $lang->trunk : $task->buildName;?>'><?php $task->build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName));?></td>
|
||||
<td><?php echo $task->begin?></td>
|
||||
<td><?php echo $task->end?></td>
|
||||
<td title='<?php echo $task->status?>'><span class="status-task status-<?php echo $task->status?>"><?php echo $this->processStatus('testtask', $task);?></span></td>
|
||||
<td title='<?php echo $this->processStatus('testtask', $task);?>'><span class="status-task status-<?php echo $task->status?>"><?php echo $this->processStatus('testtask', $task);?></span></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
common::printIcon('testtask', 'cases', "taskID=$task->id", $task, 'list', 'sitemap', '', '', '', "data-app='qa'");
|
||||
|
||||
@@ -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;}
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user