* Finish task #45081.

This commit is contained in:
tianshujie
2021-11-26 14:59:02 +08:00
parent 8bf6c34acd
commit 7810fbc629
3 changed files with 13 additions and 11 deletions
+1 -1
View File
@@ -428,7 +428,7 @@ class productplan extends control
if($browseType == 'bySearch')
{
$allStories = $this->story->getBySearch($plan->product, "0,{$plan->branch}", $queryID, 'id', '', 'story', array_keys($planStories), $pager);
$allStories = $this->story->getBySearch($plan->product, $plan->branch ? "0,{$plan->branch}" : 0, $queryID, 'id', '', 'story', array_keys($planStories), $pager);
}
else
{
+12 -9
View File
@@ -418,9 +418,10 @@ class release extends control
$this->config->product->search['actionURL'] = $this->createLink('release', 'view', "releaseID=$releaseID&type=story&link=true&param=" . helper::safe64Encode('&browseType=bySearch&queryID=myQueryID'));
$this->config->product->search['queryID'] = $queryID;
$this->config->product->search['style'] = 'simple';
$this->config->product->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($release->product => $release->product));
$this->config->product->search['params']['module']['values'] = $this->tree->getOptionMenu($release->product, $viewType = 'story', $startModuleID = 0);
$this->config->product->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairs($release->product, $release->branch, '', true);
$this->config->product->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => $this->lang->story->statusList);
$modules = $this->loadModel('tree')->getOptionMenu($release->product, 'story', 0, $release->branch ? array(BRANCH_MAIN, $release->branch) : array(BRANCH_MAIN));
$this->config->product->search['params']['module']['values'] = $release->branch ? $modules[BRANCH_MAIN] + $modules[$release->branch] : $modules[BRANCH_MAIN];
if($this->session->currentProductType == 'normal')
{
unset($this->config->product->search['fields']['branch']);
@@ -429,8 +430,8 @@ class release extends control
else
{
$this->config->product->search['fields']['branch'] = $this->lang->product->branch;
$branches = array('' => '') + $this->loadModel('branch')->getPairs($release->product, 'noempty');
if($release->branch) $branches = array('' => '', $release->branch => $branches[$release->branch]);
$branches = $this->loadModel('branch')->getPairs($release->product);
$branches = array('' => '', BRANCH_MAIN => $this->lang->branch->main, $release->branch => $branches[$release->branch]);
$this->config->product->search['params']['branch']['values'] = $branches;
}
$this->loadModel('search')->setSearchParams($this->config->product->search);
@@ -532,14 +533,16 @@ class release extends control
$this->loadModel('bug');
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
unset($this->config->bug->search['fields']['product']);
unset($this->config->bug->search['fields']['project']);
$this->config->bug->search['actionURL'] = $this->createLink('release', 'view', "releaseID=$releaseID&type=$type&link=true&param=" . helper::safe64Encode('&browseType=bySearch&queryID=myQueryID'));
$this->config->bug->search['queryID'] = $queryID;
$this->config->bug->search['style'] = 'simple';
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($release->product => $release->product));
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($release->product, $viewType = 'bug', $startModuleID = 0);
$this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($release->product);
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairs($release->product, $release->branch, '', true);
$this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($release->product, $release->branch);
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($release->product, $branch = 0, $params = '');
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
$modules = $this->loadModel('tree')->getOptionMenu($release->product, 'bug', 0, $release->branch ? array(BRANCH_MAIN, $release->branch) : array(BRANCH_MAIN));
$this->config->bug->search['params']['module']['values'] = $release->branch ? $modules[BRANCH_MAIN] + $modules[$release->branch] : $modules[BRANCH_MAIN];
if($this->session->currentProductType == 'normal')
{
unset($this->config->bug->search['fields']['branch']);
@@ -548,8 +551,8 @@ class release extends control
else
{
$this->config->bug->search['fields']['branch'] = $this->lang->product->branch;
$branches = array('' => '') + $this->loadModel('branch')->getPairs($release->product, 'noempty');
if($release->branch) $branches = array('' => '', $release->branch => $branches[$release->branch]);
$branches = $this->loadModel('branch')->getPairs($release->product);
$branches = array('' => '', BRANCH_MAIN => $this->lang->branch->main, $release->branch => $branches[$release->branch]);
$this->config->bug->search['params']['branch']['values'] = $branches;
}
$this->loadModel('search')->setSearchParams($this->config->bug->search);
-1
View File
@@ -2640,7 +2640,6 @@ class storyModel extends model
->beginIF($this->session->storyBrowseType and strpos('changed|', $this->session->storyBrowseType) !== false)->andWhere('t2.status')->in(array_keys($unclosedStatus))->fi()
->beginIF(!empty($branchParam))->andWhere('t2.branch')->eq($branchParam)->fi()
->beginIF($modules)->andWhere('t2.module')->in($modules)->fi()
->beginIF($this->app->rawModule == 'release' and $this->app->rawMethod == 'linkstory')->andWhere('t2.branch')->in($branch)->fi()
->andWhere('t2.deleted')->eq(0)
->orderBy($orderBy)
->page($pager, 't2.id')