* code for task#661

This commit is contained in:
chencongzhi520@gmail.com
2012-04-29 08:14:12 +00:00
parent 039504e882
commit 77d4edf925
3 changed files with 21 additions and 0 deletions
+16
View File
@@ -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();
}
+3
View File
@@ -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个';
+2
View File
@@ -63,6 +63,7 @@
<td><?php echo $lang->story->stageList[$story->stage];?></td>
</tr>
<?php endforeach;?>
<tr><td colspan=7 class='a-center'><?php echo sprintf($lang->build->finishStories, $closedStories->number);?></td></tr>
</table>
</div>
</td>
@@ -93,6 +94,7 @@
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
</tr>
<?php endforeach;?>
<tr><td colspan=7 class='a-center'><?php echo sprintf($lang->build->resolvedBugs, $resolvedBugs->number);?></td></tr>
</table>
</div>
</td>