* adjust for upgrade.

This commit is contained in:
wangyidong
2017-03-23 11:54:55 +08:00
parent c9bda5f577
commit 05fc92c45c
37 changed files with 652 additions and 324 deletions
+1
View File
@@ -315,6 +315,7 @@ class testtask extends control
if(!empty($_POST))
{
$this->app->loadLang('testcase');
$task = $this->testtask->getById($taskID);
$bugInfo = $this->loadModel('testreport')->getBugInfo(array($taskID => $taskID), array($productID => $productID), $task->begin, $task->end, array($task->build => $task->build));
foreach($this->post->charts as $chart)
+36 -5
View File
@@ -11,11 +11,13 @@
*/
$lang->testtask->index = "Index";
$lang->testtask->create = "Create";
$lang->testtask->reportChart = 'Report';
$lang->testtask->delete = "Delete";
$lang->testtask->view = "Info";
$lang->testtask->edit = "Edit";
$lang->testtask->browse = "Test Tasks";
$lang->testtask->linkCase = "Link Cases";
$lang->testtask->selectVersion = "Select Version";
$lang->testtask->unlinkCase = "Unlink";
$lang->testtask->batchUnlinkCases = "Batch unlink cases";
$lang->testtask->batchAssign = "Batch Assign";
@@ -31,11 +33,13 @@ $lang->testtask->next = 'Next';
$lang->testtask->start = "Start";
$lang->testtask->close = "Close";
$lang->testtask->wait = "Build to be Tested";
$lang->testtask->blocked = "Blocked";
$lang->testtask->doing = "Activation";
$lang->testtask->doingA = "Doing Build";
$lang->testtask->blockedA = "Blocked Build";
$lang->testtask->block = "Block";
$lang->testtask->activate = "Activation";
$lang->testtask->testing = "Testing Build";
$lang->testtask->blocked = "Blocked Build";
$lang->testtask->done = "Tested Build";
$lang->testtask->totalStatus = "All";
$lang->testtask->all = "All Product";
$lang->testtask->common = 'Test build';
$lang->testtask->product = $lang->productCommon;
@@ -54,7 +58,7 @@ $lang->testtask->linkVersion = 'Version';
$lang->testtask->lastRunAccount = "Run";
$lang->testtask->lastRunTime = 'Time';
$lang->testtask->lastRunResult = 'Result';
$lang->testtask->report = 'Report';
$lang->testtask->reportField = 'Report';
$lang->testtask->files = 'Upload';
$lang->testtask->legendDesc = 'Desc';
@@ -73,6 +77,7 @@ $lang->testtask->priList[2] = '2';
$lang->testtask->priList[4] = '4';
$lang->testtask->unlinkedCases = 'Unlinked Cases';
$lang->testtask->linkByBuild = 'Copy by build';
$lang->testtask->linkByStory = 'Linked by Story';
$lang->testtask->linkByBug = 'Linked by Bug';
$lang->testtask->linkBySuite = 'Linked by Suite';
@@ -84,6 +89,7 @@ $lang->testtask->showFail = 'Failed <span class="text-danger">%s</span> tim
$lang->testtask->confirmDelete = 'Do you want to delete this test build?';
$lang->testtask->confirmUnlinkCase = 'Do you want to unlink this Case?';
$lang->testtask->noticeNoOther = 'There are no other test task for this product';
$lang->testtask->assignedToMe = 'Assigned to Me';
$lang->testtask->allCases = 'All Cases';
@@ -109,3 +115,28 @@ $lang->testtask->action = new stdclass();
$lang->testtask->action->testtaskopened = '$date, <strong>$actor</strong> opened test task <strong>$extra</strong>.' . "\n";
$lang->testtask->action->testtaskstarted = '$date, <strong>$actor</strong> started test task <strong>$extra</strong>.' . "\n";
$lang->testtask->action->testtaskclosed = '$date, <strong>$actor</strong> finished test task<strong>$extra</strong>.' . "\n";
$lang->testtask->unexecuted = 'Not performed';
/* 统计报表。*/
$lang->testtask->report = new stdclass();
$lang->testtask->report->common = 'Report';
$lang->testtask->report->select = 'Select report type';
$lang->testtask->report->create = 'Generate';
$lang->testtask->report->charts['testTaskPerRunResult'] = 'Result Report';
$lang->testtask->report->charts['testTaskPerType'] = 'Type Report';
$lang->testtask->report->charts['testTaskPerModule'] = 'Module Report';
$lang->testtask->report->charts['testTaskPerRunner'] = 'Runner Report';
$lang->testtask->report->charts['bugSeverityGroups'] = 'Bug Severity Distribution';
$lang->testtask->report->charts['bugStatusGroups'] = 'Bug Status Distribution';
$lang->testtask->report->charts['bugOpenedByGroups'] = 'Bug CreatedBy Distribution';
$lang->testtask->report->charts['bugResolvedByGroups'] = 'Bug ResolvedBy Distribution';
$lang->testtask->report->charts['bugResolutionGroups'] = 'Bug Resolution Distribution';
$lang->testtask->report->charts['bugModuleGroups'] = 'Bug Module Distribution';
$lang->testtask->report->options = new stdclass();
$lang->testtask->report->options->graph = new stdclass();
$lang->testtask->report->options->type = 'pie';
$lang->testtask->report->options->width = 500;
$lang->testtask->report->options->height = 140;
+2 -17
View File
@@ -40,7 +40,6 @@ $lang->testtask->blocked = "被阻塞版本";
$lang->testtask->done = "已测版本";
$lang->testtask->totalStatus = "全部";
$lang->testtask->all = "全部产品";
$lang->testtask->caseResultSave = "保存";
$lang->testtask->common = '测试视图版本';
$lang->testtask->product = '所属' . $lang->productCommon;
@@ -78,7 +77,7 @@ $lang->testtask->priList[2] = '2';
$lang->testtask->priList[4] = '4';
$lang->testtask->unlinkedCases = '未关联';
$lang->testtask->linkByVersion = '复制版本';
$lang->testtask->linkByBuild = '复制版本';
$lang->testtask->linkByStory = '按需求关联';
$lang->testtask->linkByBug = '按Bug关联';
$lang->testtask->linkBySuite = '按套件关联';
@@ -117,21 +116,7 @@ $lang->testtask->action->testtaskopened = '$date, 由 <strong>$actor</strong>
$lang->testtask->action->testtaskstarted = '$date, 由 <strong>$actor</strong> 启动版本 <strong>$extra</strong>。' . "\n";
$lang->testtask->action->testtaskclosed = '$date, 由 <strong>$actor</strong> 完成版本 <strong>$extra</strong>。' . "\n";
$lang->testtask->resultList['n/a'] = '忽略';
$lang->testtask->resultList['pass'] = '通过';
$lang->testtask->resultList['fail'] = '失败';
$lang->testtask->resultList['blocked'] = '阻塞';
$lang->testtask->unexecuted = '未执行';
/* Define the types. */
$lang->testtask->typeList[''] = '';
$lang->testtask->typeList['feature'] = '功能测试';
$lang->testtask->typeList['performance'] = '性能测试';
$lang->testtask->typeList['config'] = '配置相关';
$lang->testtask->typeList['install'] = '安装部署';
$lang->testtask->typeList['security'] = '安全相关';
$lang->testtask->typeList['interface'] = '接口测试';
$lang->testtask->typeList['other'] = '其他';
$lang->testtask->unexecuted = '未执行';
/* 统计报表。*/
$lang->testtask->report = new stdclass();
+5 -8
View File
@@ -369,7 +369,7 @@ class testtaskModel extends model
$datas = $this->dao->select('lastRunResult AS name, COUNT(*) AS value')->from(TABLE_TESTRUN)->where('task')->eq($taskID)->groupBy('name')->orderBy('value DESC')->fetchAll('name');
if(!$datas) return array();
foreach($datas as $result => $data) $data->name = isset($this->lang->testtask->resultList[$result])? $this->lang->testtask->resultList[$result] : $this->lang->testtask->unexecuted;
foreach($datas as $result => $data) $data->name = isset($this->lang->testcase->resultList[$result])? $this->lang->testcase->resultList[$result] : $this->lang->testtask->unexecuted;
return $datas;
}
@@ -392,7 +392,7 @@ class testtaskModel extends model
->fetchAll('name');
if(!$datas) return array();
foreach($datas as $result => $data) if(isset($this->lang->testtask->typeList[$result])) $data->name = $this->lang->testtask->typeList[$result];
foreach($datas as $result => $data) if(isset($this->lang->testcase->typeList[$result])) $data->name = $this->lang->testcase->typeList[$result];
return $datas;
}
@@ -593,6 +593,8 @@ class testtaskModel extends model
{
if($this->post->cases == false) return;
$postData = fixer::input('post')->get();
if($type == 'bybuild') $assignedToPairs = $this->dao->select('`case`, assignedTo')->from(TABLE_TESTRUN)->where('`case`')->in($postData)->fetchPairs('case', 'assignedTo');
foreach($postData->cases as $caseID)
{
$row = new stdclass();
@@ -601,12 +603,7 @@ class testtaskModel extends model
$row->version = $postData->versions[$caseID];
$row->assignedTo = '';
$row->status = 'wait';
if($type == 'bybuild')
{
$assignedTo = $this->dao->select('assignedTo')->from(TABLE_TESTRUN)->where('`case`')->eq($caseID)->fetch();
$row->assignedTo = $assignedTo->assignedTo;
}
if($type == 'bybuild') $row->assignedTo = zget($assignedToPairs, $caseID, '');
$this->dao->replace(TABLE_TESTRUN)->data($row)->exec();
}
+1 -1
View File
@@ -42,7 +42,7 @@
echo "</ul></span>";
echo "<span class='dropdown'>";
echo "<button class='btn btn-primary btn-sm' type='button' data-toggle='dropdown'>{$lang->testtask->linkByVersion} <span class='caret'></span></button>";
echo "<button class='btn btn-primary btn-sm' type='button' data-toggle='dropdown'>{$lang->testtask->linkByBuild} <span class='caret'></span></button>";
echo "<ul class='dropdown-menu' style='max-height:240px;overflow-y:auto'>";
if($testTask)
{
+1 -1
View File
@@ -12,7 +12,7 @@
?>
<?php include '../../common/view/header.lite.html.php';?>
<?php include '../../common/view/form.html.php';?>
<?php js::set('caseResultSave', $lang->testtask->caseResultSave);?>
<?php js::set('caseResultSave', $lang->save);?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['usecase']);?> <strong><?php echo $run->case->id;?></strong></span>