* finish task #40900.

This commit is contained in:
wangyidong
2021-08-04 16:58:15 +08:00
parent 392f0b1525
commit 87a04e4857
4 changed files with 59 additions and 49 deletions
+2 -4
View File
@@ -101,15 +101,13 @@ class bug extends control
{
$this->loadModel('datatable');
$products = $this->loadModel('product')->getPairs('noclosed');
$productID = $this->product->saveState($productID, $products);
$this->qa->setMenu($products, $productID, $branch);
$productID = $this->product->saveState($productID, $this->products);
$this->qa->setMenu($this->products, $productID, $branch);
/* Set browse type. */
$browseType = strtolower($browseType);
/* Set productID, moduleID, queryID and branch. */
if(!$this->projectID) $productID = $this->product->saveState($productID, $this->products);
$branch = ($branch == '') ? (int)$this->cookie->preBranch : (int)$branch;
setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
setcookie('preBranch', (int)$branch, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
+19 -15
View File
@@ -42,25 +42,29 @@ class testcase extends control
$this->loadModel('qa');
/* Get product data. */
$products = array();
$objectID = 0;
if($this->app->openApp == 'project')
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
if(!isonlybody())
{
$objectID = $this->session->project;
$products = $this->loadModel('project')->getProducts($objectID, false);
}
elseif($this->app->openApp == 'execution')
{
$objectID = $this->session->execution;
$products = $this->loadModel('execution')->getProducts($objectID, false);
}
else
{
$products = $this->product->getPairs();
}
if($this->app->openApp == 'project')
{
$objectID = $this->session->project;
$products = $this->loadModel('project')->getProducts($objectID, false);
}
elseif($this->app->openApp == 'execution')
{
$objectID = $this->session->execution;
$products = $this->loadModel('execution')->getProducts($objectID, false);
}
else
{
$products = $this->product->getPairs();
}
if(empty($products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testcase&objectID=$objectID")));
}
$this->view->products = $this->products = $products;
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testcase&objectID=$objectID")));
}
/**
+19 -15
View File
@@ -45,25 +45,29 @@ class testreport extends control
$this->app->loadLang('report');
/* Get product data. */
$products = array();
$objectID = 0;
if($this->app->openApp == 'project')
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
if(!isonlybody())
{
$objectID = $this->session->project;
$products = $this->loadModel('project')->getProducts($objectID, false);
}
elseif($this->app->openApp == 'execution')
{
$objectID = $this->session->execution;
$products = $this->loadModel('execution')->getProducts($objectID, false);
}
else
{
$products = $this->product->getPairs();
}
if($this->app->openApp == 'project')
{
$objectID = $this->session->project;
$products = $this->loadModel('project')->getProducts($objectID, false);
}
elseif($this->app->openApp == 'execution')
{
$objectID = $this->session->execution;
$products = $this->loadModel('execution')->getProducts($objectID, false);
}
else
{
$products = $this->product->getPairs();
}
if(empty($products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testreport&objectID=$objectID")));
}
$this->view->products = $this->products = $products;
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testreport&objectID=$objectID")));
}
/**
+19 -15
View File
@@ -40,25 +40,29 @@ class testtask extends control
$this->loadModel('product');
/* Get product data. */
$products = array();
$objectID = 0;
if($this->app->openApp == 'project')
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
if(!isonlybody())
{
$objectID = $this->session->project;
$products = $this->loadModel('project')->getProducts($objectID, false);
}
elseif($this->app->openApp == 'execution')
{
$objectID = $this->session->execution;
$products = $this->loadModel('execution')->getProducts($objectID, false);
}
else
{
$products = $this->product->getPairs();
}
if($this->app->openApp == 'project')
{
$objectID = $this->session->project;
$products = $this->loadModel('project')->getProducts($objectID, false);
}
elseif($this->app->openApp == 'execution')
{
$objectID = $this->session->execution;
$products = $this->loadModel('execution')->getProducts($objectID, false);
}
else
{
$products = $this->product->getPairs();
}
if(empty($products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testtask&objectID=$objectID")));
}
$this->view->products = $this->products = $products;
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testtask&objectID=$objectID")));
}
/**