Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3

This commit is contained in:
hufangzhou
2021-03-30 10:29:54 +08:00
10 changed files with 80 additions and 36 deletions
+7 -5
View File
@@ -178,7 +178,7 @@ $lang->scrum->menu->index = array('link' => "{$lang->dashboard}|project|inde
$lang->scrum->menu->execution = array('link' => "$lang->executionCommon|project|execution|projectID=%s");
$lang->scrum->menu->story = array('link' => "$lang->SRCommon|projectstory|story|projectID=%s", 'subModule' => 'projectstory', 'alias' => 'story,track');
$lang->scrum->menu->doc = array('link' => "{$lang->doc->common}|doc|objectLibs|type=project&objectID=%s", 'subModule' => 'doc');
$lang->scrum->menu->qa = array('link' => "{$lang->qa->common}|project|qa|projectID=%s", 'subModule' => 'testcase,testtask,bug', 'alias' => 'bug,testtask,testcase');
$lang->scrum->menu->qa = array('link' => "{$lang->qa->common}|project|qa|projectID=%s", 'subModule' => 'testcase,testtask,bug,testreport', 'alias' => 'bug,testtask,testcase,testreport');
$lang->scrum->menu->devops = array('link' => "{$lang->repo->common}|repo|browse|repoID=0&branchID=&objectID=%s", 'subModule' => 'repo');
$lang->scrum->menu->build = array('link' => "{$lang->build->common}|project|build|project=%s");
$lang->scrum->menu->release = array('link' => "{$lang->release->common}|projectrelease|browse|project=%s", 'subModule' => 'projectrelease');
@@ -198,10 +198,12 @@ $lang->scrum->menuOrder[48] = 'dynamic';
$lang->scrum->menuOrder[50] = 'settings';
$lang->scrum->menu->qa['subMenu'] = new stdclass();
$lang->scrum->menu->qa['subMenu']->index = array('link' => "$lang->dashboard|project|qa|projectID=%s");
$lang->scrum->menu->qa['subMenu']->bug = array('link' => "{$lang->bug->common}|project|bug|projectID=%s", 'subModule' => 'bug');
$lang->scrum->menu->qa['subMenu']->testcase = array('link' => "{$lang->testcase->shortCommon}|project|testcase|projectID=%s", 'subModule' => 'testsuite,testcase,caselib,tree');
$lang->scrum->menu->qa['subMenu']->testtask = array('link' => "{$lang->testtask->common}|project|testtask|projectID=%s", 'subModule' => 'testtask', 'class' => 'dropdown dropdown-hover');
$lang->scrum->menu->qa['subMenu']->index = array('link' => "$lang->dashboard|project|qa|projectID=%s");
$lang->scrum->menu->qa['subMenu']->bug = array('link' => "{$lang->bug->common}|project|bug|projectID=%s", 'subModule' => 'bug');
$lang->scrum->menu->qa['subMenu']->testcase = array('link' => "{$lang->testcase->shortCommon}|project|testcase|projectID=%s", 'subModule' => 'testsuite,testcase,caselib,tree');
$lang->scrum->menu->qa['subMenu']->testtask = array('link' => "{$lang->testtask->common}|project|testtask|projectID=%s", 'subModule' => 'testtask', 'class' => 'dropdown dropdown-hover');
$lang->scrum->menu->qa['subMenu']->testtask = array('link' => "{$lang->testtask->common}|project|testtask|projectID=%s", 'subModule' => 'testtask', 'class' => 'dropdown dropdown-hover');
$lang->scrum->menu->qa['subMenu']->testreport = array('link' => "{$lang->testreport->common}|project|testreport|projectID=%s", 'subModule' => 'testreport');
$lang->scrum->menu->settings['subMenu'] = new stdclass();
$lang->scrum->menu->settings['subMenu']->view = array('link' => "$lang->overview|project|view|project=%s", 'alias' => 'edit');
+3 -2
View File
@@ -947,10 +947,11 @@ class execution extends control
}
/**
* Execution case list.
* List of test reports for the execution.
*
* @param int $executionID
* @param string $type
* @param string $objectType project|execution|product
* @param string $extra
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
+1 -1
View File
@@ -29,7 +29,7 @@
</div>
<div class="btn-toolbar pull-right">
<?php if(common::canModify('execution', $execution)):?>
<?php common::printLink('testtask', 'create', "product=0&executionID=$executionID&build=&projectID=$execution->project", "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-primary'");?>
<?php common::printLink('testtask', 'create', "product=0&executionID=$executionID&build=0&projectID=$execution->project", "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-primary'");?>
<?php endif;?>
</div>
</div>
+20
View File
@@ -769,6 +769,24 @@ class project extends control
echo $this->fetch('testcase', 'browse', "productID=$productID&branch=$branch&browseType=$browseType&param=$param&orderBy=$orderBy&recTotal=$orderBy&recPerPage=$recPerPage&pageID=$pageID&projectID=$projectID");
}
/**
* List of test reports for the project.
*
* @param int $projectID
* @param string $objectType project|execution|product
* @param string $extra
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function testreport($projectID = 0, $objectType = 'project', $extra = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
echo $this->fetch('testreport', 'browse', "objectID=$projectID&objectType=$objectType&extra=$extra&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
}
/**
* Project test task list.
*
@@ -783,9 +801,11 @@ class project extends control
public function testtask($projectID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->loadModel('testtask');
$this->app->loadLang('testreport');
/* Save session. */
$this->session->set('testtaskList', $this->app->getURI(true), 'qa');
$this->session->set('buildList', $this->app->getURI(true), 'execution');
$this->project->setMenu($projectID);
+7
View File
@@ -0,0 +1,7 @@
.table-group-btns {width: 200px;}
.table-footer,
.table-grouped {box-shadow: none !important;}
.table-footer {margin-left: 205px; margin-top: 10px;}
.table-grouped > thead>tr>th.c-id,
.table-grouped > tbody>tr>td.c-id {padding-left: 15px;}
.table-grouped > tbody>tr>td {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
+6 -8
View File
@@ -29,7 +29,6 @@
</div>
<div class="btn-toolbar pull-right">
<?php if(common::canModify('project', $project)):?>
<?php //common::printIcon('testreport', 'browse', "objectID=$projectID&objectType=project", '', 'button','flag muted');?>
<?php common::printLink('testtask', 'create', "product=0&executionID=0&build=0&projectID=$projectID", "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-primary'");?>
<?php endif;?>
</div>
@@ -91,15 +90,14 @@
<?php
if($canBeChanged)
{
common::printIcon('testtask', 'cases', "taskID=$task->id", $task, 'list', 'sitemap');
common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task, 'list', 'link');
common::printIcon('testreport', 'browse', "objectID=$task->product&objectType=product&extra=$task->id", $task, 'list','flag');
common::printIcon('testtask', 'edit', "taskID=$task->id", $task, 'list');
if(common::hasPriv('testtask', 'delete', $task))
common::printIcon('testtask', 'cases', "taskID=$task->id", $task, 'list', 'sitemap');
common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task, 'list', 'link');
if(common::hasPriv('execution', 'testreport'))
{
$deleteURL = $this->createLink('testtask', 'delete', "taskID=$task->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"taskList\", confirmDelete)", '<i class="icon-trash"></i>', '', "class='btn' title='{$lang->testtask->delete}'");
echo html::a($this->createLink('testreport', 'browse', "objectID=$task->product&objectType=product&extra=$task->id"), '<i class="icon-testreport-browse icon-flag"></i>', '', 'class="btn " title="' . $lang->testreport->browse . '" data-app="qa"');
}
common::printIcon('testtask', 'edit', "taskID=$task->id", $task, 'list');
common::printIcon('testtask', 'delete', "taskID=$task->id", $task, 'list', 'trash', 'hiddenwin');
}
?>
</td>
+24 -15
View File
@@ -165,13 +165,6 @@ class testreport extends control
die(js::locate(inlink('view', "reportID=$reportID"), 'parent'));
}
/*
if($this->app->openApp == 'execution')
{
$this->loadModel('execution')->setMenu($);
}
*/
if($objectType == 'testtask')
{
if(empty($objectID) and $extra) $productID = $extra;
@@ -352,12 +345,20 @@ class testreport extends control
$this->view->position[] = html::a($browseLink, $product->name);
$this->view->position[] = $this->lang->testreport->edit;
}
elseif($this->app->openApp == 'execution')
elseif($this->app->openApp == 'execution' or $this->app->openApp == 'project')
{
$executionID = $this->commonAction($report->execution, 'execution');
if($executionID != $report->execution) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
if($this->app->openApp == 'execution')
{
$objectID = $this->commonAction($report->execution, 'execution');
if($objectID != $report->execution) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
}
else
{
$objectID = $this->commonAction($report->project, 'project');
if($objectID != $report->project) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
}
$browseLink = inlink('browse', "objectID=$executionID&objectType=execution");
$browseLink = inlink('browse', "objectID=$objectID&objectType=execution");
$this->view->position[] = html::a($browseLink, $execution->name);
$this->view->position[] = $this->lang->testreport->edit;
}
@@ -458,12 +459,20 @@ class testreport extends control
$browseLink = inlink('browse', "objectID=$productID&objectType=product");
$this->view->position[] = html::a($browseLink, $product->name);
}
elseif($this->app->openApp == 'execution')
elseif($this->app->openApp == 'execution' or $this->app->openApp == 'project')
{
$executionID = $this->commonAction($report->execution, 'execution');
if($executionID != $report->execution) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
if($this->app->openApp == 'execution')
{
$objectID = $this->commonAction($report->execution, 'execution');
if($objectID != $report->execution) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
}
else
{
$objectID = $this->commonAction($report->project, 'project');
if($objectID != $report->project) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
}
$browseLink = inlink('browse', "objectID=$executionID&objectType=execution");
$browseLink = inlink('browse', "objectID=$objectID&objectType=execution");
$this->view->position[] = html::a($browseLink, $execution->name);
}
+1 -1
View File
@@ -65,7 +65,7 @@ $lang->testreport->buildSummary = '共测试了<strong>%s</strong>个版本。
$lang->testreport->confirmDelete = '是否删除该报告?';
$lang->testreport->moreNotice = '更多功能可以参考禅道扩展机制进行扩展,也可以联系我们进行定制。';
$lang->testreport->exportNotice = "由<a href='https://www.zentao.net' target='_blank' style='color:grey'>禅道项目管理软件</a>导出";
$lang->testreport->noReport = "暂无报告,请测试单生成测试报告。";
$lang->testreport->noReport = "暂无报告,请选择测试单生成测试报告。";
$lang->testreport->foundBugTip = "影响版本在测试轮次内,并且创建时间在测试时间范围内产生的Bug数。";
$lang->testreport->legacyBugTip = "Bug状态是激活,或Bug的解决时间在测试结束时间之后。";
$lang->testreport->fromCaseBugTip = "测试时间范围内,用例执行失败后创建的Bug。";
+3 -2
View File
@@ -146,9 +146,10 @@ class testreportModel extends model
public function getList($objectID, $objectType, $extra = '', $orderBy = 'id_desc', $pager = null)
{
$objectID = (int)$objectID;
return $this->dao->select('*')->from(TABLE_TESTREPORT)->where('deleted')->eq(0)
return $this->dao->select('*')->from(TABLE_TESTREPORT)
->where('deleted')->eq(0)
->beginIF($objectType == 'execution')->andWhere('objectID')->eq($objectID)->andWhere('objectType')->eq('execution')->fi()
->beginIF($objectType == 'project')->andWhere('objectID')->eq($objectID)->andWhere('objectType')->eq('project')->fi()
->beginIF($objectType == 'project')->andWhere('project')->eq($objectID)->andWhere('objectType')->eq('execution')->fi()
->beginIF($objectType == 'product' and $extra)->andWhere('objectID')->eq((int)$extra)->andWhere('objectType')->eq('testtask')->fi()
->beginIF($objectType == 'product' and empty($extra))->andWhere('product')->eq($objectID)->fi()
->orderBy($orderBy)
+8 -2
View File
@@ -20,11 +20,17 @@ class testtaskModel extends model
* @access public
* @return void
*/
function create($projectID)
function create($projectID = 0)
{
if($this->post->execution)
{
$execution = $this->loadModel('execution')->getByID($this->post->execution);
$projectID = $execution->project;
}
$task = fixer::input('post')
->setDefault('build', '')
->setIF($this->config->systemMode == 'new' and $this->app->openApp != 'qa', 'project', $projectID)
->setIF($this->config->systemMode == 'new', 'project', $projectID)
->stripTags($this->config->testtask->editor->create['id'], $this->config->allowedTags)
->join('mailto', ',')
->remove('uid,contactListMenu')