* merge from 15.0.beta3.

This commit is contained in:
wangyidong
2021-06-05 13:01:53 +08:00
parent 7ff5ccae12
commit 769e6b433b
220 changed files with 2661 additions and 1370 deletions
+56 -13
View File
@@ -216,6 +216,8 @@ class testtask extends control
$this->loadModel('action')->create('testtask', $taskID, 'opened');
$this->executeHooks($taskID);
if($this->viewType == 'json') $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $taskID));
$task = $this->dao->findById($taskID)->from(TABLE_TESTTASK)->fetch();
if($this->app->openApp == 'project') $link = $this->createLink('project', 'testtask', "projectID=$task->project");
if($this->app->openApp == 'execution') $link = $this->createLink('execution', 'testtask', "executionID=$task->execution");
@@ -242,6 +244,8 @@ class testtask extends control
$executions = empty($productID) ? array() : $this->loadModel('product')->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk', true);
$testreports = $this->testtask->getTestReportPairsByBuild($build);
/* Set menu. */
$productID = $this->product->saveState($productID, $this->products);
@@ -256,6 +260,7 @@ class testtask extends control
$this->view->executions = $executions;
$this->view->builds = $builds;
$this->view->build = $build;
$this->view->testreports = $testreports;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|qdfirst|nodeleted');
$this->display();
@@ -315,13 +320,14 @@ class testtask extends control
$this->view->position[] = $this->lang->testtask->common;
$this->view->position[] = $this->lang->testtask->view;
$this->view->productID = $productID;
$this->view->task = $task;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->actions = $this->loadModel('action')->getList('testtask', $taskID);
$this->view->build = $build;
$this->view->stories = $stories;
$this->view->bugs = $bugs;
$this->view->productID = $productID;
$this->view->task = $task;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->actions = $this->loadModel('action')->getList('testtask', $taskID);
$this->view->build = $build;
$this->view->testreportTitle = $this->dao->select('title')->from(TABLE_TESTREPORT)->where('id')->eq($task->testreport)->fetch('title');
$this->view->stories = $stories;
$this->view->bugs = $bugs;
$this->display();
}
@@ -740,15 +746,17 @@ class testtask extends control
$this->view->position[] = $this->lang->testtask->edit;
/* Create testtask from testtask of test.*/
$productID = $productID ? $productID : key($this->products);
$projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->project;
$executions = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk', true);
$productID = $productID ? $productID : key($this->products);
$projectID = $this->lang->navGroup->testtask == 'qa' ? 0 : $this->session->project;
$executions = empty($productID) ? array() : $this->product->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
$builds = empty($productID) ? array() : $this->loadModel('build')->getProductBuildPairs($productID, 0, 'notrunk', true);
$testreports = $this->testtask->getTestReportPairsByBuild($task->build);
$this->view->task = $task;
$this->view->executions = $executions;
$this->view->builds = $builds;
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', $task->owner);
$this->view->testreports = $testreports;
$this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed', $task->owner);
$this->view->contactLists = $this->user->getContactLists($this->app->user->account, 'withnote');
$this->display();
@@ -1069,12 +1077,14 @@ class testtask extends control
$response['result'] = 'success';
$response['message'] = '';
$testRun = $this->dao->select('task,`case`')->from(TABLE_TESTRUN)->where('id')->eq((int)$rowID)->fetch();
$this->dao->delete()->from(TABLE_TESTRUN)->where('id')->eq((int)$rowID)->exec();
if(dao::isError())
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
}
$this->loadModel('action')->create('case' ,$testRun->case, 'unlinkedfromtesttask', '', $testRun->task);
$this->send($response);
}
}
@@ -1094,6 +1104,8 @@ class testtask extends control
->where('task')->eq((int)$taskID)
->andWhere('`case`')->in($this->post->caseIDList)
->exec();
$this->loadModel('action');
foreach($_POST['caseIDList'] as $caseID) $this->action->create('case', $caseID, 'unlinkedfromtesttask', '', $taskID);
}
die(js::locate($this->createLink('testtask', 'cases', "taskID=$taskID")));
@@ -1126,6 +1138,8 @@ class testtask extends control
$caseResult = $this->testtask->createResult($runID);
if(dao::isError()) die(js::error(dao::getError()));
$taskID = empty($run->task) ? 0 : $run->task;
$this->loadModel('action')->create('case', $caseID, 'run', '', $taskID);
if($caseResult == 'fail')
{
@@ -1200,6 +1214,8 @@ class testtask extends control
if($this->post->results)
{
$this->testtask->batchRun($from, $taskID);
$this->loadModel('action');
foreach(array_keys($this->post->results) as $caseID) $this->action->create('case', $caseID, 'run', '', $taskID);
die(js::locate($url, 'parent'));
}
@@ -1209,7 +1225,18 @@ class testtask extends control
/* The case of tasks of qa. */
if($productID or ($this->app->openApp == 'project' and empty($productID)))
{
$this->app->openApp == 'project' ? $this->loadModel('project')->setMenu($this->session->project) : $this->loadModel('qa')->setMenu($this->products, $productID, $taskID);
if($this->app->openApp == 'project')
{
$this->loadModel('project')->setMenu($this->session->project);
}
elseif($this->app->openApp == 'execution')
{
$this->loadModel('execution')->setMenu($this->session->execution);
}
else
{
$this->loadModel('qa')->setMenu($this->products, $productID, $taskID);
}
$this->view->moduleOptionMenu = $this->loadModel('tree')->getOptionMenu($productID, 'case');
$cases = $this->dao->select('*')->from(TABLE_CASE)->where('id')->in($caseIDList)->fetchAll('id');
@@ -1316,6 +1343,8 @@ class testtask extends control
->where('task')->eq((int)$taskID)
->andWhere('`case`')->in($this->post->caseIDList)
->exec();
$this->loadModel('action');
foreach($this->post->caseIDList as $caseID) $this->action->create('case', $caseID, 'assigned', '', $taskID);
die(js::locate($this->session->caseList, 'parent'));
}
@@ -1411,4 +1440,18 @@ class testtask extends control
$pairs = $this->testtask->getPairs($productID, $executionID);
die(html::select('testtask', $pairs, '', "class='form-control chosen'"));
}
/**
* Ajax get test report.
*
* @param int $buildID
* @access public
* @return void
*/
public function ajaxGetTestReports($buildID)
{
/* Testreport list. */
$pairs = $this->testtask->getTestReportPairsByBuild($buildID);
die(html::select('testreport', $pairs, '', "class='form-control chosen'"));
}
}
+19
View File
@@ -94,6 +94,25 @@ function loadExecutionBuilds(executionID)
});
}
/**
* Load test report.
*
* @param int buildID
* @access public
* @return void
*/
function loadTestReports(buildID)
{
link = createLink('testtask', 'ajaxGetTestReports', 'buildID=' + buildID);
$.get(link, function(data)
{
if(!data) data = '<select id="testreport" name="testreport" class="form-control"></select>';
$('#testreport').replaceWith(data);
$('#testreport_chosen').remove();
$("#testreport").chosen();
});
}
/**
* when begin date input change and end date input is null
* change end date input to begin's after day
+2 -2
View File
@@ -7,8 +7,8 @@
function loadProductRelated()
{
loadExecutions($('#product').val());
data = '<select id="build" name="build" class="form-control"></select>';
$('#build').replaceWith(data);
buildData = '<select id="build" name="build" class="form-control" onchange="loadTestReports(this.value)"></select>';
$('#build').replaceWith(buildData);
$('#build_chosen').remove();
$("#build").chosen();
$('#build').trigger("chosen:updated");
+10
View File
@@ -59,6 +59,7 @@ $lang->testtask->common = 'Testaufgabe';
$lang->testtask->product = $lang->productCommon;
$lang->testtask->project = 'Project';
$lang->testtask->execution = $lang->execution->common;
$lang->testtask->type = 'Typ';
$lang->testtask->build = 'Build';
$lang->testtask->owner = 'Besitzer';
$lang->testtask->executor = 'Executor';
@@ -71,6 +72,7 @@ $lang->testtask->desc = 'Beschreibung';
$lang->testtask->mailto = 'Mail an';
$lang->testtask->status = 'Status';
$lang->testtask->subStatus = 'Sub Status';
$lang->testtask->testreport = 'Test Report';
$lang->testtask->assignedTo = 'Zugeordnet';
$lang->testtask->linkVersion = 'Version';
$lang->testtask->lastRunAccount = 'Ausgeführt von';
@@ -174,6 +176,8 @@ $lang->testtask->report->charts['bugOpenedByGroups'] = 'Bugersteller Bericht'
$lang->testtask->report->charts['bugResolvedByGroups'] = 'Gelöst von Bericht';
$lang->testtask->report->charts['bugResolutionGroups'] = 'Lösungsbersicht';
$lang->testtask->report->charts['bugModuleGroups'] = 'Bug Modul Bericht';
$lang->testtask->report->charts['bugStageGroups'] = 'Bug importance stage distribution';
$lang->testtask->report->charts['bugHandleGroups'] = 'Distribution of daily bug processing';
$lang->testtask->report->options = new stdclass();
$lang->testtask->report->options->graph = new stdclass();
@@ -193,3 +197,9 @@ $lang->testtask->unitTag['thisWeek'] = 'This week';
$lang->testtask->unitTag['lastWeek'] = 'Last week';
$lang->testtask->unitTag['thisMonth'] = 'This month';
$lang->testtask->unitTag['lastMonth'] = 'Last month';
$lang->testtask->typeList['integrate'] = 'Integrate';
$lang->testtask->typeList['system'] = 'System';
$lang->testtask->typeList['acceptance'] = 'Acceptance';
$lang->testtask->typeList['performance'] = 'Performance';
$lang->testtask->typeList['safety'] = 'Safety';
+10
View File
@@ -62,6 +62,7 @@ $lang->testtask->common = 'Request';
$lang->testtask->product = $lang->productCommon;
$lang->testtask->project = 'Project';
$lang->testtask->execution = $lang->execution->common;
$lang->testtask->type = 'Type';
$lang->testtask->build = 'Build';
$lang->testtask->owner = 'Owner';
$lang->testtask->executor = 'Executor';
@@ -74,6 +75,7 @@ $lang->testtask->desc = 'Description';
$lang->testtask->mailto = 'Mailto';
$lang->testtask->status = 'Status';
$lang->testtask->subStatus = 'Sub Status';
$lang->testtask->testreport = 'Test Report';
$lang->testtask->assignedTo = 'Assigned';
$lang->testtask->linkVersion = 'Build';
$lang->testtask->lastRunAccount = 'RunBy';
@@ -177,6 +179,8 @@ $lang->testtask->report->charts['bugOpenedByGroups'] = 'Bug ReportedBy Distri
$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->charts['bugStageGroups'] = 'Bug importance stage distribution';
$lang->testtask->report->charts['bugHandleGroups'] = 'Distribution of daily bug processing';
$lang->testtask->report->options = new stdclass();
$lang->testtask->report->options->graph = new stdclass();
@@ -196,3 +200,9 @@ $lang->testtask->unitTag['thisWeek'] = 'This week';
$lang->testtask->unitTag['lastWeek'] = 'Last week';
$lang->testtask->unitTag['thisMonth'] = 'This month';
$lang->testtask->unitTag['lastMonth'] = 'Last month';
$lang->testtask->typeList['integrate'] = 'Integrate';
$lang->testtask->typeList['system'] = 'System';
$lang->testtask->typeList['acceptance'] = 'Acceptance';
$lang->testtask->typeList['performance'] = 'Performance';
$lang->testtask->typeList['safety'] = 'Safety';
+10
View File
@@ -59,6 +59,7 @@ $lang->testtask->common = 'Recette';
$lang->testtask->product = $lang->productCommon;
$lang->testtask->project = 'Project';
$lang->testtask->execution = $lang->execution->common;
$lang->testtask->type = 'Type';
$lang->testtask->build = 'Build';
$lang->testtask->owner = 'Owner';
$lang->testtask->executor = 'Executeur';
@@ -71,6 +72,7 @@ $lang->testtask->desc = 'Description';
$lang->testtask->mailto = 'Mailto';
$lang->testtask->status = 'Statut';
$lang->testtask->subStatus = 'Sous-statut';
$lang->testtask->testreport = 'Test Report';
$lang->testtask->assignedTo = 'Affecté';
$lang->testtask->linkVersion = 'Build';
$lang->testtask->lastRunAccount = 'Jouée par';
@@ -174,6 +176,8 @@ $lang->testtask->report->charts['bugOpenedByGroups'] = 'Distribution signalem
$lang->testtask->report->charts['bugResolvedByGroups'] = 'Distribution Résolus par';
$lang->testtask->report->charts['bugResolutionGroups'] = 'Distribution Résolution';
$lang->testtask->report->charts['bugModuleGroups'] = 'Distribution Bug Module';
$lang->testtask->report->charts['bugStageGroups'] = 'Bug importance stage distribution';
$lang->testtask->report->charts['bugHandleGroups'] = 'Distribution of daily bug processing';
$lang->testtask->report->options = new stdclass();
$lang->testtask->report->options->graph = new stdclass();
@@ -193,3 +197,9 @@ $lang->testtask->unitTag['thisWeek'] = 'This week';
$lang->testtask->unitTag['lastWeek'] = 'Last week';
$lang->testtask->unitTag['thisMonth'] = 'This month';
$lang->testtask->unitTag['lastMonth'] = 'Last month';
$lang->testtask->typeList['integrate'] = 'Integrate';
$lang->testtask->typeList['system'] = 'System';
$lang->testtask->typeList['acceptance'] = 'Acceptance';
$lang->testtask->typeList['performance'] = 'Performance';
$lang->testtask->typeList['safety'] = 'Safety';
+10
View File
@@ -59,6 +59,7 @@ $lang->testtask->common = 'Yêu cầu';
$lang->testtask->product = $lang->productCommon;
$lang->testtask->project = 'Project';
$lang->testtask->execution = $lang->execution->common;
$lang->testtask->type = 'Kiểu';
$lang->testtask->build = 'Bản dựng';
$lang->testtask->owner = 'Sở hữu';
$lang->testtask->executor = 'Executor';
@@ -71,6 +72,7 @@ $lang->testtask->desc = 'Mô tả';
$lang->testtask->mailto = 'Mail tới';
$lang->testtask->status = 'Tình trạng';
$lang->testtask->subStatus = 'Tình trạng con';
$lang->testtask->testreport = 'Test Report';
$lang->testtask->assignedTo = 'Đã giao';
$lang->testtask->linkVersion = 'Bản dựng';
$lang->testtask->lastRunAccount = 'Chạy bởi';
@@ -174,6 +176,8 @@ $lang->testtask->report->charts['bugOpenedByGroups'] = 'Phân chia người b
$lang->testtask->report->charts['bugResolvedByGroups'] = 'Phân chia người giải quyết Bug';
$lang->testtask->report->charts['bugResolutionGroups'] = 'Phân chia giải pháp Bug';
$lang->testtask->report->charts['bugModuleGroups'] = 'Phân chia Module Bug';
$lang->testtask->report->charts['bugStageGroups'] = 'Bug importance stage distribution';
$lang->testtask->report->charts['bugHandleGroups'] = 'Distribution of daily bug processing';
$lang->testtask->report->options = new stdclass();
$lang->testtask->report->options->graph = new stdclass();
@@ -193,3 +197,9 @@ $lang->testtask->unitTag['thisWeek'] = 'This week';
$lang->testtask->unitTag['lastWeek'] = 'Last week';
$lang->testtask->unitTag['thisMonth'] = 'This month';
$lang->testtask->unitTag['lastMonth'] = 'Last month';
$lang->testtask->typeList['integrate'] = 'Integrate';
$lang->testtask->typeList['system'] = 'System';
$lang->testtask->typeList['acceptance'] = 'Acceptance';
$lang->testtask->typeList['performance'] = 'Performance';
$lang->testtask->typeList['safety'] = 'Safety';
+10
View File
@@ -62,6 +62,7 @@ $lang->testtask->common = '测试单';
$lang->testtask->product = '所属' . $lang->productCommon;
$lang->testtask->project = '所属项目';
$lang->testtask->execution = '所属' . $lang->execution->common;
$lang->testtask->type = '测试类型';
$lang->testtask->build = '版本';
$lang->testtask->owner = '负责人';
$lang->testtask->executor = '执行人';
@@ -74,6 +75,7 @@ $lang->testtask->desc = '描述';
$lang->testtask->mailto = '抄送给';
$lang->testtask->status = '当前状态';
$lang->testtask->subStatus = '子状态';
$lang->testtask->testreport = '相关测试报告';
$lang->testtask->assignedTo = '指派给';
$lang->testtask->linkVersion = '版本';
$lang->testtask->lastRunAccount = '执行人';
@@ -177,6 +179,8 @@ $lang->testtask->report->charts['bugOpenedByGroups'] = 'Bug创建者分布';
$lang->testtask->report->charts['bugResolvedByGroups'] = 'Bug解决者分布';
$lang->testtask->report->charts['bugResolutionGroups'] = 'Bug解决方案分布';
$lang->testtask->report->charts['bugModuleGroups'] = 'Bug模块分布';
$lang->testtask->report->charts['bugStageGroups'] = 'Bug重要程度阶段分布';
$lang->testtask->report->charts['bugHandleGroups'] = 'Bug每日处理情况分布';
$lang->testtask->report->options = new stdclass();
$lang->testtask->report->options->graph = new stdclass();
@@ -196,3 +200,9 @@ $lang->testtask->unitTag['thisWeek'] = '本周';
$lang->testtask->unitTag['lastWeek'] = '上周';
$lang->testtask->unitTag['thisMonth'] = '本月';
$lang->testtask->unitTag['lastMonth'] = '上月';
$lang->testtask->typeList['integrate'] = '集成测试';
$lang->testtask->typeList['system'] = '系统测试';
$lang->testtask->typeList['acceptance'] = '验收测试';
$lang->testtask->typeList['performance'] = '性能测试';
$lang->testtask->typeList['safety'] = '安全测试';
+9 -1
View File
@@ -61,7 +61,8 @@ $lang->testtask->id = '編號';
$lang->testtask->common = '測試單';
$lang->testtask->product = '所屬' . $lang->productCommon;
$lang->testtask->project = '所屬項目';
$lang->testtask->execution = '所屬' . $lang->executionCommon;
$lang->testtask->execution = '所屬' . $lang->execution->common;
$lang->testtask->type = '測試類型';
$lang->testtask->build = '版本';
$lang->testtask->owner = '負責人';
$lang->testtask->executor = '執行人';
@@ -74,6 +75,7 @@ $lang->testtask->desc = '描述';
$lang->testtask->mailto = '抄送給';
$lang->testtask->status = '當前狀態';
$lang->testtask->subStatus = '子狀態';
$lang->testtask->testreport = '相關測試報告';
$lang->testtask->assignedTo = '指派給';
$lang->testtask->linkVersion = '版本';
$lang->testtask->lastRunAccount = '執行人';
@@ -196,3 +198,9 @@ $lang->testtask->unitTag['thisWeek'] = '本週';
$lang->testtask->unitTag['lastWeek'] = '上周';
$lang->testtask->unitTag['thisMonth'] = '本月';
$lang->testtask->unitTag['lastMonth'] = '上月';
$lang->testtask->typeList['integrate'] = '整合測試';
$lang->testtask->typeList['system'] = '系統測試';
$lang->testtask->typeList['acceptance'] = '驗收測試';
$lang->testtask->typeList['performance'] = '性能測試';
$lang->testtask->typeList['safety'] = '安全測試';
+22 -3
View File
@@ -33,7 +33,8 @@ class testtaskModel extends model
->setIF($this->config->systemMode == 'new', 'project', $projectID)
->stripTags($this->config->testtask->editor->create['id'], $this->config->allowedTags)
->join('mailto', ',')
->remove('uid,contactListMenu')
->join('type', ',')
->remove('files,labels,uid,contactListMenu')
->get();
$task = $this->loadModel('file')->processImgURL($task, $this->config->testtask->editor->create['id'], $this->post->uid);
@@ -49,6 +50,7 @@ class testtaskModel extends model
{
$taskID = $this->dao->lastInsertID();
$this->file->updateObjectID($this->post->uid, $taskID, 'testtask');
$this->file->saveUpload('testtask', $taskID);
return $taskID;
}
}
@@ -267,6 +269,7 @@ class testtaskModel extends model
$task = $this->loadModel('file')->replaceImgURL($task, 'desc');
if($setImgSize) $task->desc = $this->loadModel('file')->setImgSize($task->desc);
$task->files = $this->loadModel('file')->getByObject('testtask', $task->id);
return $task;
}
@@ -489,6 +492,20 @@ class testtaskModel extends model
->fetchAll();
}
/**
* Get test report pairs by build.
*
* @param string $build
* @access public
* @return array
*/
public function getTestReportPairsByBuild($build = '')
{
if(empty($build)) return array();
return $this->dao->select('id,title')->from(TABLE_TESTREPORT)->where("CONCAT(',', builds, ',')")->like("%,$build,%")->fetchPairs('id','title');
}
/**
* Get related test tasks.
*
@@ -730,7 +747,7 @@ class testtaskModel extends model
public function update($taskID)
{
$oldTask = $this->dao->select("*")->from(TABLE_TESTTASK)->where('id')->eq((int)$taskID)->fetch();
$task = fixer::input('post')->stripTags($this->config->testtask->editor->edit['id'], $this->config->allowedTags)->join('mailto', ',')->remove('uid,comment,contactListMenu')->get();
$task = fixer::input('post')->stripTags($this->config->testtask->editor->edit['id'], $this->config->allowedTags)->join('mailto', ',')->join('type', ',')->remove('files,labels,uid,comment,contactListMenu')->get();
$task = $this->loadModel('file')->processImgURL($task, $this->config->testtask->editor->edit['id'], $this->post->uid);
$this->dao->update(TABLE_TESTTASK)->data($task)
->autoCheck()
@@ -741,6 +758,7 @@ class testtaskModel extends model
if(!dao::isError())
{
$this->file->updateObjectID($this->post->uid, $taskID, 'testtask');
$this->file->saveUpload('testtask', $taskID);
return common::createChanges($oldTask, $task);
}
}
@@ -878,6 +896,7 @@ class testtaskModel extends model
$data->version = 1;
$data->order = ++ $lastOrder;
$this->dao->replace(TABLE_PROJECTCASE)->data($data)->exec();
$this->loadModel('action')->create('case', $caseID, 'linked2testtask', '', $taskID);
}
}
}
@@ -1431,7 +1450,7 @@ class testtaskModel extends model
case 'status':
if($caseChanged)
{
echo "<span class='warning'>{$this->lang->testcase->changed}</span>";
echo "<span title='{$this->lang->testcase->changed}' class='warning'>{$this->lang->testcase->changed}</span>";
}
else
{
+2 -2
View File
@@ -105,9 +105,9 @@ $status = $this->session->testTaskVersionStatus;
echo '<div id="action-divider">';
common::printIcon('testtask', 'cases', "taskID=$task->id", $task, 'list', 'sitemap');
common::printIcon('testtask', 'linkCase', "taskID=$task->id&type=all&param=myQueryID", $task, 'list', 'link');
common::printIcon('testreport', 'browse', "objectID=$task->product&objectType=product&extra=$task->id", $task, 'list','flag');
common::printIcon('testreport', 'browse', "objectID=$task->product&objectType=product&extra=$task->id", $task, 'list', 'flag');
echo '</div>';
common::printIcon('testtask', 'view', "taskID=$task->id", '', 'list', 'list-alt','','iframe',true);
common::printIcon('testtask', 'view', "taskID=$task->id", '', 'list', 'list-alt', '', 'iframe', true, "data-width='90%'");
common::printIcon('testtask', 'edit', "taskID=$task->id", $task, 'list');
if(common::hasPriv('testtask', 'delete', $task))
{
+14 -2
View File
@@ -24,7 +24,7 @@
<table class='table table-form'>
<?php if(isset($executionID)):?>
<tr>
<th class='w-80px'><?php echo $lang->testtask->product;?></th>
<th class='w-100px'><?php echo $lang->testtask->product;?></th>
<td class='w-p35-f'><?php echo html::select('product', $products, $productID, "class='form-control chosen' onchange='loadProductRelated()'");?></td><td></td>
</tr>
<?php else:?>
@@ -41,7 +41,7 @@
<th class='w-80px'><?php echo $lang->testtask->build;?></th>
<td class='w-p35-f'>
<div class='input-group' id='buildBox'>
<?php echo html::select('build', empty($builds) ? '' : $builds, $build, "class='form-control chosen'");?>
<?php echo html::select('build', empty($builds) ? '' : $builds, $build, "class='form-control chosen' onchange='loadTestReports(this.value)'");?>
<?php if(isset($executionID) and $executionID and empty($builds)):?>
<span class='input-group-addon'><?php echo html::a(helper::createLink('build', 'create', "executionID=$executionID&productID=$productID&projectID=$projectID", '', true), $lang->build->create, '', "data-toggle='modal' data-type='iframe' data-width='95%'")?> </span>
</div>
@@ -50,6 +50,10 @@
</td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->testtask->type;?></th>
<td><?php echo html::select('type[]', $lang->testtask->typeList, '', "class='form-control chosen' multiple");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->owner;?></th>
<td>
@@ -74,6 +78,10 @@
<th><?php echo $lang->testtask->status;?></th>
<td><?php echo html::select('status', $lang->testtask->statusList, '', "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->testreport;?></th>
<td><?php echo html::select('testreport', $testreports, '', "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->name;?></th>
<td colspan='2'><?php echo html::input('name', '', "class='form-control'");?></td>
@@ -82,6 +90,10 @@
<th><?php echo $lang->testtask->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', '', "rows=10 class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->files;?></th>
<td colspan='3'><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->mailto;?></th>
<td colspan='2'>
+15 -3
View File
@@ -25,7 +25,7 @@
<form method='post' class="main-form form-ajax" enctype="multipart/form-data" id='dataform'>
<table class='table table-form'>
<tr>
<th class='w-80px'><?php echo $lang->testtask->execution;?></th>
<th class='w-100px'><?php echo $lang->testtask->execution;?></th>
<td class='w-p35-f'>
<?php
echo html::select('execution', $executions, $task->execution, "class='form-control chosen' onchange='loadExecutionRelated(this.value)'");
@@ -35,10 +35,14 @@
<td></td>
</tr>
<tr>
<th class='w-80px'><?php echo $lang->testtask->build;?></th>
<td class='w-p35-f'><span id='buildBox'><?php echo html::select('build', $builds, $task->build, "class='form-control chosen'");?></span></td>
<th><?php echo $lang->testtask->build;?></th>
<td class='w-p35-f'><span id='buildBox'><?php echo html::select('build', $builds, $task->build, "class='form-control chosen' onchange='loadTestReports(this.value)'");?></span></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->testtask->type;?></th>
<td><?php echo html::select('type[]', $lang->testtask->typeList, $task->type, "class='form-control chosen' multiple");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->owner;?></th>
<td>
@@ -63,6 +67,10 @@
<th><?php echo $lang->testtask->status;?></th>
<td><?php echo html::select('status', $lang->testtask->statusList, $task->status, "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->testreport;?></th>
<td><?php echo html::select('testreport', $testreports, $task->testreport, "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->name;?></th>
<td colspan='2'><?php echo html::input('name', $task->name, "class='form-control'");?></td>
@@ -75,6 +83,10 @@
<th><?php echo $lang->comment;?></th>
<td colspan='2'><?php echo html::textarea('comment', '', "rows='5' class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->files;?></th>
<td colspan='3'><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->mailto;?></th>
<td colspan='2'>
+12 -1
View File
@@ -33,6 +33,7 @@
<div class="detail-title"><?php echo $lang->testtask->desc;?></div>
<div class="detail-content article-content"><?php echo !empty($task->desc) ? $task->desc : $lang->noData;?></div>
</div>
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'true', 'object' => $task));?>
<?php if($task->report):?>
<div class="detail">
<div class="detail-title"><?php echo $lang->testtask->report;?></div>
@@ -79,7 +80,7 @@
<table class="table table-data table-fixed">
<?php $isOnlybody = helper::inOnlyBodyMode(); ?>
<tr>
<th class='w-60px'><?php echo $lang->testtask->execution;?></th>
<th class='w-90px'><?php echo $lang->testtask->execution;?></th>
<td><?php echo $isOnlybody ? $task->executionName : html::a($this->createLink('execution', 'story', "executionID=$task->execution"), $task->executionName, '', "title='{$task->executionName}'");?></td>
</tr>
<tr>
@@ -97,6 +98,12 @@
?>
</td>
</tr>
<tr>
<th><?php echo $lang->testtask->type;?></th>
<?php $testType = '';?>
<?php foreach(explode(',', $task->type) as $type) $testType .= zget($lang->testtask->typeList, $type) . ' ';?>
<td class="c-name" title="<?php echo $testType;?>"><?php echo $testType;?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->owner;?></th>
<td><?php echo zget($users, $task->owner);?></td>
@@ -121,6 +128,10 @@
<th><?php echo $lang->testtask->status;?></th>
<td class='task-<?php echo $task->status?>'><?php echo $this->processStatus('testtask', $task);?></td>
</tr>
<tr>
<th><?php echo $lang->testtask->testreport;?></th>
<td class="c-name" title="<?php echo $testreportTitle;?>"><?php echo empty($task->testreport) ? '' : html::a($this->createLink('testreport', 'view', "reportID=$task->testreport"), $testreportTitle);?></td>
</tr>
</table>
</div>
</div>