diff --git a/trunk/module/bug/control.php b/trunk/module/bug/control.php index 5b0d0acff9..f35404d7d3 100644 --- a/trunk/module/bug/control.php +++ b/trunk/module/bug/control.php @@ -105,6 +105,14 @@ class bug extends control { $bugs = $this->dao->findByResolution('postponed')->from(TABLE_BUG)->andWhere('product')->eq($productID)->orderBy($orderBy)->page($pager)->fetchAll(); } + elseif($browseType == 'needconfirm') + { + $bugs = $this->dao->select('t1.*, t2.title AS storyTitle')->from(TABLE_BUG)->alias('t1')->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id') + ->where("t2.status = 'active'") + ->andWhere('t2.version > t1.storyVersion') + ->orderBy($orderBy) + ->fetchAll(); + } elseif($browseType == 'bysearch') { if($this->session->bugQuery == false) $this->session->set('bugQuery', ' 1 = 1'); @@ -407,6 +415,15 @@ class bug extends control $this->display(); } + /* 确认需求变动。*/ + public function confirmStoryChange($bugID) + { + $bug = $this->bug->getById($bugID); + $this->dao->update(TABLE_BUG)->set('storyVersion')->eq($bug->latestStoryVersion)->where('id')->eq($bugID)->exec(); + $this->loadModel('action')->create('bug', $bugID, 'confirmed', '', $bug->latestStoryVersion); + die(js::reload('parent')); + } + /* 获得用户的bug列表。*/ public function ajaxGetUserBugs($account = '') { diff --git a/trunk/module/bug/lang/zh-cn.php b/trunk/module/bug/lang/zh-cn.php index 371d894fea..e4a56635d7 100644 --- a/trunk/module/bug/lang/zh-cn.php +++ b/trunk/module/bug/lang/zh-cn.php @@ -44,6 +44,7 @@ $lang->bug->postponedBugs = '被延期'; $lang->bug->allBugs = '所有Bug'; $lang->bug->moduleBugs = '按模块浏览'; $lang->bug->byQuery = '搜索'; +$lang->bug->needConfirm = '需求有变动的Bug'; $lang->bug->allProduct = '所有产品'; $lang->bug->lblProductAndModule = '产品模块'; diff --git a/trunk/module/bug/model.php b/trunk/module/bug/model.php index c202e95606..28945b3b4e 100644 --- a/trunk/module/bug/model.php +++ b/trunk/module/bug/model.php @@ -73,7 +73,7 @@ class bugModel extends model /* 获取一个bug的详细信息。*/ public function getById($bugID) { - $bug = $this->dao->select('t1.*, t2.name AS projectName, t3.title AS storyTitle, t4.name AS taskName') + $bug = $this->dao->select('t1.*, t2.name AS projectName, t3.title AS storyTitle, t3.status AS storyStatus, t3.version AS latestStoryVersion, t4.name AS taskName') ->from(TABLE_BUG)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') ->leftJoin(TABLE_STORY)->alias('t3')->on('t1.story = t3.id') diff --git a/trunk/module/bug/view/browse.html.php b/trunk/module/bug/view/browse.html.php index 56a2f08387..6c66816289 100644 --- a/trunk/module/bug/view/browse.html.php +++ b/trunk/module/bug/view/browse.html.php @@ -60,7 +60,8 @@ function browseBySearch(active) echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=longLifeBugs¶m=0"), $lang->bug->longLifeBugs) . ""; echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=postponedBugs¶m=0"), $lang->bug->postponedBugs) . ""; echo "{$lang->bug->byQuery} "; - echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=all¶m=0&orderBy=$orderBy&recTotal=0&recPerPage=200"), $lang->bug->allBugs) . ""; + echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=all¶m=0&orderBy=$orderBy&recTotal=0&recPerPage=200"), $lang->bug->allBugs) . ""; + echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=needconfirm¶m=0"), $lang->bug->needConfirm) . ""; ?>