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

This commit is contained in:
zhujinyong
2021-03-25 10:57:41 +08:00
6 changed files with 23 additions and 5 deletions
+2
View File
@@ -136,6 +136,8 @@ ALTER TABLE `zt_task` ADD `designVersion` smallint(6) unsigned NOT NULL AFTER `s
ALTER TABLE `zt_burn` ADD `storyPoint` float NOT NULL AFTER `consumed`;
ALTER TABLE `zt_burn` ADD `product` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `execution`;
ALTER TABLE `zt_projectcase` ADD `count` mediumint(8) unsigned NOT NULL DEFAULT '1' AFTER `case`;
-- DROP TABLE IF EXISTS `zt_taskspec`;
CREATE TABLE IF NOT EXISTS `zt_taskspec` (
`task` mediumint(8) NOT NULL,
+4
View File
@@ -257,6 +257,10 @@ class block extends control
{
$block->moreLink = $this->createLink($moduleName, 'work', 'mode=' . $method . '&' . $vars);
}
elseif($moduleName = 'project')
{
$block->moreLink = $this->createLink('project', 'dynamic', "projectID={$this->session->project}");
}
}
elseif($block->block == 'dynamic')
{
+2 -2
View File
@@ -61,7 +61,7 @@
}
/**
* Get app app code from url
* Get app code from url
* @param {String} urlOrModuleName Url string
* @return {String}
*/
@@ -474,7 +474,7 @@
window.addEventListener('popstate', function(event)
{
if(lastOpenedApp !== event.state.app) openApp(event.state.app);
if(event.state && lastOpenedApp !== event.state.app) openApp(event.state.app);
});
/* Redirect or open default app after document load */
+9 -2
View File
@@ -42,6 +42,7 @@ class testcase extends control
$this->loadModel('qa');
$this->view->products = $this->products = $this->product->getPairs();
if($this->app->openApp == 'project') $this->view->products = $this->products = $this->loadModel('project')->getProducts($this->session->project, false);
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=testcase")));
}
@@ -302,7 +303,10 @@ class testcase extends control
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true));
setcookie('caseModule', 0, 0, $this->config->webRoot, '', false, false);
$response['locate'] = $this->createLink('testcase', 'browse', "productID={$this->post->product}&branch={$this->post->branch}&browseType=all&param=0&orderBy=id_desc");
$currentModule = $this->app->openApp == 'project' ? 'project' : 'testcase';
$currentMethod = $this->app->openApp == 'project' ? 'testcase' : 'browse';
$projectParam = $this->app->openApp == 'project' ? "projectID={$this->session->project}&" : '';
$response['locate'] = $this->createLink($currentModule, $currentMethod, $projectParam . "productID={$this->post->product}&branch={$this->post->branch}&browseType=all&param=0&orderBy=id_desc");
if($this->app->openApp == 'execution') $response['locate'] = $this->createLink('execution', 'testcase', "executionID={$this->session->execution}&type=all");
$this->send($response);
}
@@ -442,7 +446,10 @@ class testcase extends control
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
setcookie('caseModule', 0, 0, $this->config->webRoot, '', false, false);
die(js::locate($this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=all&param=0&orderBy=id_desc"), 'parent'));
$currentModule = $this->app->openApp == 'project' ? 'project' : 'testcase';
$currentMethod = $this->app->openApp == 'project' ? 'testcase' : 'browse';
$projectParam = $this->app->openApp == 'project' ? "projectID={$this->session->project}&" : '';
die(js::locate($this->createLink($currentModule, $currentMethod, $projectParam . "productID=$productID&branch=$branch&browseType=all&param=0&orderBy=id_desc"), 'parent'));
}
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
+4 -1
View File
@@ -508,7 +508,10 @@ class testcaseModel extends model
->beginIF($this->app->openApp == 'project')->leftJoin(TABLE_PROJECTCASE)->alias('t2')->on('t1.id=t2.case')->fi()
->where($caseQuery)
->beginIF($this->app->openApp == 'project')->andWhere('t2.project')->eq($this->session->project)->fi()
->beginIF(!empty($productID) and $queryProductID != 'all')->andWhere('product')->eq($productID)->fi()
->beginIF(!empty($productID) and $queryProductID != 'all')
->beginIF($this->app->openApp == 'project')->andWhere('t2.product')->eq($productID)->fi()
->beginIF($this->app->openApp != 'project')->andWhere('product')->eq($productID)->fi()
->fi()
->beginIF($auto != 'unit')->andWhere('auto')->ne('unit')->fi()
->beginIF($auto == 'unit')->andWhere('auto')->eq('unit')->fi()
->andWhere('deleted')->eq(0)
+2
View File
@@ -153,7 +153,9 @@
<button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
<ul class='dropdown-menu'>
<li><?php echo html::a($actionLink, $lang->testcase->create);?></li>
<?php if(!empty($productID)):?>
<li><?php echo html::a($this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule"), $lang->testcase->batchCreate, '', "data-app='{$this->app->openApp}'");?></li>
<?php endif;?>
</ul>
</div>
<?php endif;?>