* Modify the test case back link problem.

This commit is contained in:
tianshujie
2021-08-27 15:24:32 +08:00
parent 66334479d5
commit 5f740be96b
8 changed files with 22 additions and 4 deletions
+2 -1
View File
@@ -325,8 +325,9 @@ js::set('moduleID', $moduleID);
<tfoot>
<tr>
<td colspan="3" class="text-center form-actions">
<?php $browseLink = $this->session->bugList ? $this->session->bugList : $this->inlink('browse', "productID=$productID");?>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
<?php echo html::linkButton($lang->goback, $browseLink, 'self', '', 'btn btn-wide');?>
<?php echo html::hidden('case', (int)$caseID) . html::hidden('caseVersion', (int)$version);?>
<?php echo html::hidden('result', (int)$runID) . html::hidden('testtask', empty($testtask) ? 0 : $testtask->id);?>
</td>
+3 -1
View File
@@ -926,7 +926,9 @@ class execution extends control
$this->loadModel('testcase');
$this->loadModel('testtask');
$this->commonAction($executionID);
$this->session->set('caseList', $this->app->getURI(true), 'execution');
$uri = $this->app->getURI(true);
$this->session->set('caseList', $uri, 'execution');
$this->session->set('bugList', $uri, 'execution');
$products = $this->execution->getProducts($executionID);
$productID = key($products); // Get the first product for creating testcase.
+1
View File
@@ -921,6 +921,7 @@ class project extends control
public function testcase($projectID = 0, $productID = 0, $branch = 0, $browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->loadModel('product');
$this->session->set('bugList', $this->app->getURI(true), 'project');
$products = array('0' => $this->lang->product->all) + $this->project->getProducts($projectID, false);
$this->lang->modulePageNav = $this->product->select($products, $productID, 'project', 'testcase', '', $branch, 0, '', false);
+5 -1
View File
@@ -132,7 +132,9 @@ class testcase extends control
$this->qa->setMenu($this->products, $productID, $branch);
}
$this->session->set('caseList', $this->app->getURI(true), $this->app->openApp);
$uri = $this->app->getURI(true);
$this->session->set('caseList', $uri, $this->app->openApp);
$this->session->set('bugList', $uri, $this->app->openApp);
$this->session->set('productID', $productID);
$this->session->set('moduleID', $moduleID);
$this->session->set('browseType', $browseType);
@@ -598,6 +600,8 @@ class testcase extends control
*/
public function view($caseID, $version = 0, $from = 'testcase', $taskID = 0)
{
$this->session->set('bugList', $this->app->getURI(true), $this->app->openApp);
$caseID = (int)$caseID;
$case = $this->testcase->getById($caseID, $version);
if(!$case)
+1
View File
@@ -14,6 +14,7 @@
<?php include '../../common/view/kindeditor.html.php';?>
<?php $browseLink = $app->session->caseList ? $app->session->caseList : $this->createLink('testcase', 'browse', "productID=$case->product");?>
<?php js::set('sysurl', common::getSysUrl());?>
<?php js::set('openApp', $app->openApp);?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php if(!isonlybody()):?>
+8 -1
View File
@@ -57,7 +57,14 @@ function createBug(obj)
var link = createLink('bug', 'create', params + ',stepIdList=' + stepIdList);
if(onlybody = 'yes') link += '#app=qa';
window.parent.$.apps.open(link);
if(openApp == 'my')
{
window.parent.$.apps.open(link, 'qa');
}
else
{
window.open(link, '_parent');
}
config.onlybody = onlybody;
}
+1
View File
@@ -11,6 +11,7 @@
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<?php js::set('openApp', $app->openApp);?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2>
+1
View File
@@ -13,6 +13,7 @@
<?php include '../../common/view/header.lite.html.php';?>
<?php include '../../common/view/form.html.php';?>
<?php js::set('caseResultSave', $lang->save);?>
<?php js::set('openApp', $app->openApp);?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2>