diff --git a/module/build/control.php b/module/build/control.php index 3750dd1074..5778b3ccef 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -118,6 +118,20 @@ class build extends control $stories = $this->dao->select('*')->from(TABLE_STORY)->where('id')->in($build->stories)->fetchAll(); $bugs = $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($build->bugs)->fetchAll(); + $closedStories = $this->dao->select('count(*) AS number') + ->from(TABLE_STORY) + ->where('id') + ->in($build->stories) + ->andWhere('status')->eq('closed') + ->fetch(); + + $resolvedBugs = $this->dao->select('count(*) AS number') + ->from(TABLE_BUG) + ->where('id') + ->in($build->bugs) + ->andWhere('status')->eq('resolved') + ->fetch(); + $this->loadModel('project')->setMenu($this->project->getPairs(), $build->project); /* Assign. */ @@ -127,7 +141,9 @@ class build extends control $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->build = $build; $this->view->stories = $stories; + $this->view->closedStories = $closedStories; $this->view->bugs = $bugs; + $this->view->resolvedBugs = $resolvedBugs; $this->view->actions = $this->loadModel('action')->getList('build', $buildID); $this->display(); } diff --git a/module/build/lang/zh-cn.php b/module/build/lang/zh-cn.php index dc1f641049..df6116ce16 100644 --- a/module/build/lang/zh-cn.php +++ b/module/build/lang/zh-cn.php @@ -33,3 +33,6 @@ $lang->build->linkStories = '相关需求'; $lang->build->linkBugs = '相关Bug'; $lang->build->stories = '已关联需求'; $lang->build->bugs = '已关联Bug'; + +$lang->build->finishStories = '本次共完成需求%s个'; +$lang->build->resolvedBugs = '本次共解决Bug%s个'; diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php index 268ca0fc0e..d4e846a2ff 100644 --- a/module/build/view/view.html.php +++ b/module/build/view/view.html.php @@ -63,6 +63,7 @@ story->stageList[$story->stage];?> + build->finishStories, $closedStories->number);?> @@ -93,6 +94,7 @@ resolvedDate, 5, 11)?> + build->resolvedBugs, $resolvedBugs->number);?>