* Fix bug.

This commit is contained in:
leiyong
2021-04-02 10:32:17 +03:00
parent 9ea3e4d3a4
commit c71f232391
4 changed files with 22 additions and 23 deletions
+3 -2
View File
@@ -215,8 +215,9 @@ class build extends control
->beginIF($type == 'story')->orderBy($orderBy)->fi()
->page($storyPager)
->fetchAll('id');
$stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->in($build->stories)->andWhere('branch')->eq($build->branch)->fetchPairs('story', 'stage');
foreach($stages as $storyID => $stage)$stories[$storyID]->stage = $stage;
$stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->in($build->stories)->andWhere('branch')->eq($build->branch)->fetchPairs('story', 'stage');
foreach($stages as $storyID => $stage) $stories[$storyID]->stage = $stage;
/* Set menu. */
if($this->app->openApp == 'project')
+10 -9
View File
@@ -676,7 +676,8 @@ class execution extends control
$this->loadModel('user');
$this->app->loadLang('testcase');
$type = strtolower($type);
$type = strtolower($type);
$param = (int)$param;
setcookie('storyPreExecutionID', $executionID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
if($this->cookie->storyPreExecutionID != $executionID)
{
@@ -687,20 +688,20 @@ class execution extends control
}
if($type == 'bymodule')
{
$_COOKIE['storyModuleParam'] = (int)$param;
$_COOKIE['storyModuleParam'] = $param;
$_COOKIE['storyProductParam'] = 0;
$_COOKIE['storyBranchParam'] = 0;
setcookie('storyModuleParam', (int)$param, 0, $this->config->webRoot, '', false, true);
setcookie('storyModuleParam', $param, 0, $this->config->webRoot, '', false, true);
setcookie('storyProductParam', 0, 0, $this->config->webRoot, '', false, true);
setcookie('storyBranchParam', 0, 0, $this->config->webRoot, '', false, true);
}
elseif($type == 'byproduct')
{
$_COOKIE['storyModuleParam'] = 0;
$_COOKIE['storyProductParam'] = (int)$param;
$_COOKIE['storyProductParam'] = $param;
$_COOKIE['storyBranchParam'] = 0;
setcookie('storyModuleParam', 0, 0, $this->config->webRoot, '', false, true);
setcookie('storyProductParam', (int)$param, 0, $this->config->webRoot, '', false, true);
setcookie('storyProductParam', $param, 0, $this->config->webRoot, '', false, true);
setcookie('storyBranchParam', 0, 0, $this->config->webRoot, '', false, true);
}
elseif($type == 'bybranch')
@@ -727,7 +728,7 @@ class execution extends control
/* Append id for secend sort. */
$sort = $this->loadModel('common')->appendOrder($orderBy);
$queryID = ($type == 'bysearch') ? (int)$param : 0;
$queryID = ($type == 'bysearch') ? $param : 0;
$execution = $this->commonAction($executionID);
$executionID = $execution->id;
@@ -738,10 +739,10 @@ class execution extends control
$stories = $this->story->getExecutionStories($executionID, 0, 0, $sort, $type, $param, 'story', '', $pager);
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story', false);
$users = $this->user->getPairs('noletter');
$users = $this->user->getPairs('noletter');
/* Build the search form. */
$modules = array();
$modules = array();
$executionModules = $this->loadModel('tree')->getTaskTreeModules($executionID, true);
$products = $this->execution->getProducts($executionID);
foreach($products as $product)
@@ -802,7 +803,7 @@ class execution extends control
$this->view->type = $this->session->executionStoryBrowseType;
$this->view->param = $param;
$this->view->moduleTree = $this->loadModel('tree')->getProjectStoryTreeMenu($executionID, $startModuleID = 0, array('treeModel', 'createStoryLink'));
$this->view->modulePairs = $this->tree->getModulePairs($productID, 'story', true);
$this->view->modulePairs = $this->tree->getModulePairs(0, 'story', true);
$this->view->tabID = 'story';
$this->view->storyTasks = $storyTasks;
$this->view->storyBugs = $storyBugs;
+7 -8
View File
@@ -120,14 +120,13 @@
<thead>
<tr>
<?php
$totalEstimate = 0;
$canBatchEdit = common::hasPriv('story', 'batchEdit');
$canBatchClose = common::hasPriv('story', 'batchClose');
$canBatchChangeStage = common::hasPriv('story', 'batchChangeStage');
$canBatchUnlink = common::hasPriv('execution', 'batchUnlinkStory');
$canBatchToTask = common::hasPriv('story', 'batchToTask');
$canBatchAction = ($canBeChanged and ($canBatchEdit or $canBatchClose or $canBatchChangeStage or $canBatchUnlink or $canBatchToTask));
$totalEstimate = 0;
$canBatchEdit = common::hasPriv('story', 'batchEdit');
$canBatchClose = common::hasPriv('story', 'batchClose');
$canBatchChangeStage = common::hasPriv('story', 'batchChangeStage');
$canBatchUnlink = common::hasPriv('execution', 'batchUnlinkStory');
$canBatchToTask = common::hasPriv('story', 'batchToTask');
$canBatchAction = ($canBeChanged and ($canBatchEdit or $canBatchClose or $canBatchChangeStage or $canBatchUnlink or $canBatchToTask));
?>
<?php $vars = "executionID={$execution->id}&orderBy=%s&type=$type&param=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<th class='c-id {sorter:false}'>
+2 -4
View File
@@ -864,6 +864,8 @@ class story extends control
/* Set the menu. */
$from = $this->app->openApp;
$this->product->setMenu($story->product, $story->branch);
if($from == 'execution')
{
$this->execution->setMenu($param);
@@ -872,10 +874,6 @@ class story extends control
{
$this->loadModel('project')->setMenu($param);
}
elseif($from == 'product')
{
$this->product->setMenu($story->product, $story->branch);
}
elseif($from == 'qa')
{
$products = $this->product->getProductPairsByProject(0, 'noclosed');