Merge branch '281_liuhong_81778' into 'zentaopms_281'
281 liuhong 81778 See merge request easycorp/zentaopms!6676
This commit is contained in:
@@ -37,6 +37,7 @@ $config->testcase->excludeCheckFileds = ',pri,type,stage,needReview,story,branch
|
||||
global $lang;
|
||||
$config->testcase->search['module'] = 'testcase';
|
||||
$config->testcase->search['fields']['title'] = $lang->testcase->title;
|
||||
$config->testcase->search['fields']['story'] = $lang->testcase->linkStory;
|
||||
$config->testcase->search['fields']['id'] = $lang->testcase->id;
|
||||
$config->testcase->search['fields']['keywords'] = $lang->testcase->keywords;
|
||||
$config->testcase->search['fields']['lastEditedBy'] = $lang->testcase->lastEditedByAB;
|
||||
@@ -58,6 +59,7 @@ $config->testcase->search['fields']['openedDate'] = $lang->testcase->openedD
|
||||
$config->testcase->search['fields']['lastEditedDate'] = $lang->testcase->lastEditedDateAB;
|
||||
|
||||
$config->testcase->search['params']['title'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
$config->testcase->search['params']['story'] = array('operator' => 'include', 'control' => 'select', 'values' => '');
|
||||
$config->testcase->search['params']['module'] = array('operator' => 'belong', 'control' => 'select', 'values' => 'modules');
|
||||
$config->testcase->search['params']['keywords'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
$config->testcase->search['params']['lastEditedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
|
||||
|
||||
@@ -13,6 +13,7 @@ $lang->testcase->id = 'ID';
|
||||
$lang->testcase->product = $lang->productCommon;
|
||||
$lang->testcase->project = 'Project';
|
||||
$lang->testcase->execution = 'Execution';
|
||||
$lang->testcase->linkStory = 'linkStory';
|
||||
$lang->testcase->module = 'Module';
|
||||
$lang->testcase->auto = 'Test Automation Cases';
|
||||
$lang->testcase->frame = 'Test Automation Cramework';
|
||||
|
||||
@@ -13,6 +13,7 @@ $lang->testcase->id = 'ID';
|
||||
$lang->testcase->product = $lang->productCommon;
|
||||
$lang->testcase->project = 'Project';
|
||||
$lang->testcase->execution = 'Execution';
|
||||
$lang->testcase->linkStory = 'linkStory';
|
||||
$lang->testcase->module = 'Module';
|
||||
$lang->testcase->auto = 'Test Automation Cases';
|
||||
$lang->testcase->frame = 'Test Automation Cramework';
|
||||
|
||||
@@ -13,6 +13,7 @@ $lang->testcase->id = 'ID';
|
||||
$lang->testcase->product = $lang->productCommon;
|
||||
$lang->testcase->project = 'Project';
|
||||
$lang->testcase->execution = 'Execution';
|
||||
$lang->testcase->linkStory = 'linkStory';
|
||||
$lang->testcase->module = 'Module';
|
||||
$lang->testcase->auto = 'Test Automation Cases';
|
||||
$lang->testcase->frame = 'Test Automation Cramework';
|
||||
|
||||
@@ -13,6 +13,7 @@ $lang->testcase->id = '用例编号';
|
||||
$lang->testcase->product = "所属{$lang->productCommon}";
|
||||
$lang->testcase->project = '所属项目';
|
||||
$lang->testcase->execution = '所属执行';
|
||||
$lang->testcase->linkStory = '关联需求';
|
||||
$lang->testcase->module = '所属模块';
|
||||
$lang->testcase->auto = '自动化测试用例';
|
||||
$lang->testcase->frame = '自动化测试框架';
|
||||
|
||||
@@ -1059,6 +1059,11 @@ class testtask extends control
|
||||
* Link cases to a test task.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @param string $type
|
||||
* @param int $param
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -1107,7 +1112,17 @@ class testtask extends control
|
||||
$this->config->testcase->search['actionURL'] = inlink('linkcase', "taskID=$taskID&type=$type¶m=$param");
|
||||
$this->config->testcase->search['style'] = 'simple';
|
||||
|
||||
$build = $this->loadModel('build')->getByID($task->build);
|
||||
$stories = array();
|
||||
if($build)
|
||||
{
|
||||
$stories = $this->dao->select('id,title')->from(TABLE_STORY)->where('id')->in($build->stories)->fetchPairs();
|
||||
$this->config->testcase->search['params']['story']['values'] = $stories;
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story');
|
||||
}
|
||||
|
||||
if($product->shadow) unset($this->config->testcase->search['fields']['product']);
|
||||
if($type != 'bystory') unset($this->config->testcase->search['fields']['story']);
|
||||
if($task->productType == 'normal')
|
||||
{
|
||||
unset($this->config->testcase->search['fields']['branch']);
|
||||
|
||||
+14
-12
@@ -399,18 +399,20 @@ class testtaskModel extends model
|
||||
{
|
||||
$stories = $this->dao->select('stories')->from(TABLE_BUILD)->where('id')->eq($task->build)->fetch('stories');
|
||||
$cases = array();
|
||||
$query = preg_replace('/`(\w+)`/', 't1.`$1`', $query);
|
||||
if($stories)
|
||||
{
|
||||
$cases = $this->dao->select('*')->from(TABLE_CASE)
|
||||
$cases = $this->dao->select('t1.*,t2.title as storyTitle')->from(TABLE_CASE)->alias('t1')
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')
|
||||
->where($query)
|
||||
->beginIF($this->lang->navGroup->testtask != 'qa')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->andWhere('product')->eq($productID)
|
||||
->andWhere('status')->ne('wait')
|
||||
->beginIF($linkedCases)->andWhere('id')->notIN($linkedCases)->fi()
|
||||
->beginIF($task->branch !== '')->andWhere('branch')->in("0,$task->branch")->fi()
|
||||
->andWhere('story')->in(trim($stories, ','))
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy('id desc')
|
||||
->beginIF($this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->andWhere('t1.product')->eq($productID)
|
||||
->andWhere('t1.status')->ne('wait')
|
||||
->beginIF($linkedCases)->andWhere('t1.id')->notIN($linkedCases)->fi()
|
||||
->beginIF($task->branch !== '')->andWhere('t1.branch')->in("0,$task->branch")->fi()
|
||||
->andWhere('t1.story')->in(trim($stories, ','))
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->orderBy('t1.id desc')
|
||||
->page($pager)
|
||||
->fetchAll();
|
||||
}
|
||||
@@ -1500,7 +1502,7 @@ class testtaskModel extends model
|
||||
|
||||
$failHtml = ': <span class="result-testcase fail">' . $this->lang->testtask->fail . '</span>';
|
||||
$passHtml = ': <span class="result-testcase pass">' . $this->lang->testtask->pass . '</span>';
|
||||
|
||||
|
||||
$log = preg_replace(array("/:\x20失败/", "/:\x20fail/", "/:\x20成功/", "/:\x20pass/"), array($failHtml, $failHtml, $passHtml, $passHtml), $log);
|
||||
|
||||
$logHtml .= "<li>" . $log . "</li>";
|
||||
@@ -1524,11 +1526,11 @@ class testtaskModel extends model
|
||||
}
|
||||
|
||||
$caseResult = $passCount ? 'pass':'fail';
|
||||
$logHtml .= "<li class='result-testcase {$caseResult}'>"
|
||||
$logHtml .= "<li class='result-testcase {$caseResult}'>"
|
||||
. sprintf($this->lang->testtask->stepSummary, $total, $passCount, $failCount)
|
||||
. "</li>";
|
||||
}
|
||||
|
||||
|
||||
return $logHtml;
|
||||
}
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
<th class='c-version text-center'><nobr><?php echo $lang->testtask->linkVersion;?></nobr></th>
|
||||
<th class='c-pri' title='<?php echo $lang->pri;?>'><?php echo $lang->priAB;?></th>
|
||||
<th><?php echo $lang->testcase->title;?></th>
|
||||
<th class="<?php echo $type == 'bystory' ? '' : 'hidden';?>"><?php echo $lang->testcase->linkStory;?></th>
|
||||
<th class='c-type'><?php echo $lang->testcase->type;?></th>
|
||||
<th class='c-user'><?php echo $lang->openedByAB;?></th>
|
||||
<th class='c-user'><?php echo $lang->testtask->lastRunAccount;?></th>
|
||||
@@ -112,6 +113,7 @@
|
||||
echo ')';
|
||||
?>
|
||||
</td>
|
||||
<td class="text-left title <?php echo $type == 'bystory' ? '' : 'hidden';?>" title='<?php echo $case->storyTitle?>'><?php if($case->story and $case->storyTitle) echo html::a(helper ::createLink('story', 'view', "storyID=$case->story"), $case->storyTitle);?></td>
|
||||
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
|
||||
<td><?php echo zget($users, $case->openedBy);?></td>
|
||||
<td><?php echo zget($users, $case->lastRunner);?></td>
|
||||
|
||||
Reference in New Issue
Block a user