From d53cf25a2d9a96e88b58b226bc3937872128c44a Mon Sep 17 00:00:00 2001 From: Yagami Date: Wed, 10 Oct 2018 10:01:04 +0800 Subject: [PATCH] * Finish task #4961. --- module/bug/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index cf0e07e8a5..e4c295402a 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1657,10 +1657,10 @@ class bugModel extends model */ public function getDataOfBugsPerBuild() { - $datas = $this->dao->select('openedBuild as name, count(openedBuild) as value')->from(TABLE_BUG)->where($this->reportCondition())->groupBy('openedBuild')->orderBy('value DESC')->fetchAll('name'); + $datas = $this->dao->select('openedBuild as name, count(openedBuild) as value')->from(TABLE_BUG)->where($this->reportCondition())->groupBy('openedBuild')->orderBy('openedBuild DESC')->fetchAll('name'); if(!$datas) return array(); + ksort($datas); $builds = $this->loadModel('build')->getProductBuildPairs($this->session->product, $branch = 0, $params = ''); - /* Deal with the situation that a bug maybe associate more than one openedBuild. */ foreach($datas as $buildIDList => $data) {