* adjust for release story build.

This commit is contained in:
wangyidong
2022-12-07 11:17:00 +08:00
parent 1119afb709
commit 8a2cb317c5
2 changed files with 10 additions and 0 deletions
+9
View File
@@ -247,6 +247,7 @@ class projectrelease extends control
$sort = common::appendOrder($orderBy);
if(strpos($sort, 'pri_') !== false) $sort = str_replace('pri_', 'priOrder_', $sort);
$sort .= ',buildID_asc';
$storyPager = new pager($type == 'story' ? $recTotal : 0, $recPerPage, $type == 'story' ? $pageID : 1);
$stories = $this->dao->select("t1.*,t2.id as buildID, t2.name as buildName,IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder")->from(TABLE_STORY)->alias('t1')
@@ -306,6 +307,14 @@ class projectrelease extends control
$this->view->bugPager = $bugPager;
$this->view->leftBugPager = $leftBugPager;
$this->view->builds = $this->loadModel('build')->getBuildPairs($release->product, 'all', 'withbranch|hasproject', 0, 'execution', '', false);
if($this->app->getViewType() == 'json')
{
unset($this->view->storyPager);
unset($this->view->bugPager);
unset($this->view->leftBugPager);
}
$this->display();
}
+1
View File
@@ -183,6 +183,7 @@ class release extends control
$sort = common::appendOrder($orderBy);
if(strpos($sort, 'pri_') !== false) $sort = str_replace('pri_', 'priOrder_', $sort);
$sort .= ',buildID_asc';
$storyPager = new pager($type == 'story' ? $recTotal : 0, $recPerPage, $type == 'story' ? $pageID : 1);
$stories = $this->dao->select("t1.*,t2.id as buildID, t2.name as buildName, IF(t1.`pri` = 0, {$this->config->maxPriValue}, t1.`pri`) as priOrder")->from(TABLE_STORY)->alias('t1')