diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php
index 43488d4f67..06bca9ff92 100644
--- a/module/build/view/view.html.php
+++ b/module/build/view/view.html.php
@@ -95,14 +95,14 @@ tfoot tr td .table-actions .btn{display:none;}
id}&type=story&link=$link¶m=$param&orderBy=%s";?>
-
@@ -155,14 +155,14 @@ tfoot tr td .table-actions .btn{display:none;}
id}&type=bug&link=$link¶m=$param&orderBy=%s";?>
idAB);?>
- priAB);?>
- story->title);?>
- openedByAB);?>
- story->estimateAB);?>
- statusAB);?>
- story->stageAB);?>
- actions?>
+ idAB);?>
+ priAB);?>
+ story->title);?>
+ openedByAB);?>
+ story->estimateAB);?>
+ statusAB);?>
+ story->stageAB);?>
+ actions?>
-
@@ -209,15 +209,15 @@ tfoot tr td .table-actions .btn{display:none;}
id}&type=newbug&link=$link¶m=$param&orderBy=%s";?>
idAB);?>
- bug->title);?>
- bug->status);?>
- openedByAB);?>
- bug->openedDateAB);?>
- bug->resolvedByAB);?>
- bug->resolvedDateAB);?>
- actions?>
+ idAB);?>
+ bug->title);?>
+ bug->status);?>
+ openedByAB);?>
+ bug->openedDateAB);?>
+ bug->resolvedByAB);?>
+ bug->resolvedDateAB);?>
+ actions?>
-
diff --git a/module/release/control.php b/module/release/control.php
index 01a11c5f2e..9a8f99c152 100644
--- a/module/release/control.php
+++ b/module/release/control.php
@@ -126,7 +126,7 @@ class release extends control
* @access public
* @return void
*/
- public function view($releaseID, $type = 'story', $link = 'false', $param = '')
+ public function view($releaseID, $type = 'story', $link = 'false', $param = '', $orderBy = 'id_desc')
{
if($type == 'story') $this->session->set('storyList', $this->app->getURI(true));
if($type == 'bug' or $type == 'leftBug') $this->session->set('bugList', $this->app->getURI(true));
@@ -137,15 +137,21 @@ class release extends control
$release = $this->release->getById((int)$releaseID, true);
if(!$release) die(js::error($this->lang->notFound) . js::locate('back'));
- $stories = $this->dao->select('*')->from(TABLE_STORY)->where('id')->in($release->stories)->andWhere('deleted')->eq(0)->fetchAll('id');
+ $stories = $this->dao->select('*')->from(TABLE_STORY)->where('id')->in($release->stories)->andWhere('deleted')->eq(0)
+ ->beginIF($type == 'story')->orderBy($orderBy)->fi()
+ ->fetchAll('id');
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story');
$stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->in($release->stories)->andWhere('branch')->eq($release->branch)->fetchPairs('story', 'stage');
foreach($stages as $storyID => $stage)$stories[$storyID]->stage = $stage;
- $bugs = $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($release->bugs)->andWhere('deleted')->eq(0)->fetchAll();
+ $bugs = $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($release->bugs)->andWhere('deleted')->eq(0)
+ ->beginIF($type == 'bug')->orderBy($orderBy)->fi()
+ ->fetchAll();
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'linkedBug');
- $leftBugs = $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($release->leftBugs)->andWhere('deleted')->eq(0)->fetchAll();
+ $leftBugs = $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($release->leftBugs)->andWhere('deleted')->eq(0)
+ ->beginIF($type == 'leftBug')->orderBy($orderBy)->fi()
+ ->fetchAll();
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'leftBugs');
$this->commonAction($release->product);
@@ -162,6 +168,7 @@ class release extends control
$this->view->type = $type;
$this->view->link = $link;
$this->view->param = $param;
+ $this->view->orderBy = $orderBy;
$this->view->branchName = $release->productType == 'normal' ? '' : $this->loadModel('branch')->getById($release->branch);
$this->display();
}
diff --git a/module/release/view/linkbug.html.php b/module/release/view/linkbug.html.php
index cf1b6467d4..908e02aeb4 100644
--- a/module/release/view/linkbug.html.php
+++ b/module/release/view/linkbug.html.php
@@ -10,6 +10,10 @@
* @link http://www.zentao.net
*/
?>
+app->getWebRoot() . "js/";
+include '../../common/view/tablesorter.html.php';
+?>
idAB);?>
- bug->severityAB);?>
- bug->title);?>
- bug->status);?>
- openedByAB);?>
- bug->openedDateAB);?>
- bug->resolvedByAB);?>
- bug->resolvedDateAB);?>
- actions?>
+ idAB);?>
+ bug->severityAB);?>
+ bug->title);?>
+ bug->status);?>
+ openedByAB);?>
+ bug->openedDateAB);?>
+ bug->resolvedByAB);?>
+ bug->resolvedDateAB);?>
+ actions?>