Merge branch 'zentaopms_258_task#76435' into 'master'

* Finish task #76435、76436、76437.

See merge request easycorp/zentaopms!6234
This commit is contained in:
王怡栋
2022-11-17 08:47:30 +00:00
3 changed files with 26 additions and 36 deletions
+10 -18
View File
@@ -260,7 +260,7 @@ class build extends control
$bugPager = new pager($type == 'bug' ? $recTotal : 0, $recPerPage, $type == 'bug' ? $pageID : 1);
$bugs = $this->dao->select('*')->from(TABLE_BUG)
->where('id')->in($build->bugs)
->where('id')->in($build->allBugs)
->andWhere('deleted')->eq(0)
->beginIF($type == 'bug')->orderBy($sort)->fi()
->page($bugPager)
@@ -269,7 +269,7 @@ class build extends control
/* Get stories and stages. */
$storyPager = new pager($type == 'story' ? $recTotal : 0, $recPerPage, $type == 'story' ? $pageID : 1);
$stories = $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder")->from(TABLE_STORY)
->where('id')->in($build->stories)
->where('id')->in($build->allStories)
->andWhere('deleted')->eq(0)
->beginIF($type == 'story')->orderBy($sort)->fi()
->page($storyPager)
@@ -282,10 +282,14 @@ class build extends control
if($this->app->tab == 'project')
{
$this->loadModel('project')->setMenu($build->project);
$objectType = 'project';
$objectID = $build->project;
}
elseif($this->app->tab == 'execution')
{
$this->loadModel('execution')->setMenu($build->execution);
$objectType = 'execution';
$objectID = $build->execution;
}
$executions = $this->loadModel('execution')->getPairs($this->session->project, 'all', 'empty');
@@ -302,18 +306,6 @@ class build extends control
$this->executeHooks($buildID);
if($this->app->tab == 'execution')
{
$objectType = 'execution';
$objectID = $build->execution;
}
else
{
$objectType = 'project';
$objectID = $build->project;
}
/* Assign. */
$this->view->canBeChanged = common::canBeChanged('build', $build); // Determines whether an object is editable.
$this->view->users = $this->loadModel('user')->getPairs('noletter');
@@ -616,11 +608,11 @@ class build extends control
$executionID = $build->execution ? $build->execution : $build->project;
if($browseType == 'bySearch')
{
$allStories = $this->story->getBySearch($build->product, $build->branch, $queryID, 'id', $executionID, 'story', $build->stories, $pager);
$allStories = $this->story->getBySearch($build->product, $build->branch, $queryID, 'id', $executionID, 'story', $build->allStories, $pager);
}
else
{
$allStories = $this->story->getExecutionStories($executionID, $build->product, 0, 't1.`order`_desc', 'byBranch', $build->branch, 'story', $build->stories, $pager);
$allStories = $this->story->getExecutionStories($executionID, $build->product, 0, 't1.`order`_desc', 'byBranch', $build->branch, 'story', $build->allStories, $pager);
}
$this->view->allStories = $allStories;
@@ -740,11 +732,11 @@ class build extends control
$executionID = $build->execution ? $build->execution : $build->project;
if($browseType == 'bySearch')
{
$allBugs = $this->bug->getBySearch($build->product, $build->branch, $queryID, 'id_desc', $build->bugs, $pager, $build->project);
$allBugs = $this->bug->getBySearch($build->product, $build->branch, $queryID, 'id_desc', $build->allBugs, $pager, $build->project);
}
else
{
$allBugs = $this->bug->getExecutionBugs($executionID, 0, 'all', $buildID, 'noclosed', 0, 'status_desc,id_desc', $build->bugs, $pager);
$allBugs = $this->bug->getExecutionBugs($executionID, 0, 'all', $buildID, 'noclosed', 0, 'status_desc,id_desc', $build->allBugs, $pager);
}
$this->view->allBugs = $allBugs;