diff --git a/module/block/control.php b/module/block/control.php index 2368dd0b60..550a2443c5 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -203,6 +203,7 @@ class block extends control * Display dashboard for app. * * @param string $module + * @param string $type * @access public * @return void */ @@ -1331,14 +1332,14 @@ class block extends control } /** - * Print srcum project block. + * Print sprint block. * * @access public * @return void */ public function printSprintBlock() { - $status = $this->dao->select('status, count(*) as count')->from(TABLE_PROJECT) + $sprints = $this->dao->select('status, count(*) as sprints')->from(TABLE_EXECUTION) ->where('deleted')->eq(0) ->andWhere('type')->eq('sprint') ->andWhere('parent')->eq($this->session->PRJ) @@ -1346,9 +1347,9 @@ class block extends control ->fetchPairs(); $summary = new stdclass(); - $summary->total = array_sum($status); - $summary->doing = zget($status, 'doing', 0); - $summary->closed = zget($status, 'closed', 0); + $summary->total = array_sum($sprints); + $summary->doing = zget($sprints, 'doing', 0); + $summary->closed = zget($sprints, 'closed', 0); $progress = new stdclass(); $progress->doing = $summary->total == 0 ? 0 : round($summary->doing / $summary->total, 3); diff --git a/module/block/lang/de.php b/module/block/lang/de.php index 29ef822efb..b4878a843e 100644 --- a/module/block/lang/de.php +++ b/module/block/lang/de.php @@ -217,6 +217,13 @@ $lang->block->default['project']['4']['params']['count'] = 15; $lang->block->default['project']['4']['params']['orderBy'] = 'id_desc'; $lang->block->default['project']['4']['params']['type'] = 'assignedTo'; +$lang->block->default['project']['5']['title'] = 'Build List'; +$lang->block->default['project']['5']['block'] = 'build'; +$lang->block->default['project']['5']['grid'] = 8; + +$lang->block->default['project']['5']['params']['count'] = 15; +$lang->block->default['project']['5']['params']['orderBy'] = 'id_desc'; + $lang->block->default['qa']['1']['title'] = 'Test Report'; $lang->block->default['qa']['1']['block'] = 'statistic'; $lang->block->default['qa']['1']['grid'] = 8; diff --git a/module/block/lang/en.php b/module/block/lang/en.php index 70a52e7777..68610dd446 100644 --- a/module/block/lang/en.php +++ b/module/block/lang/en.php @@ -217,6 +217,13 @@ $lang->block->default['project']['4']['params']['count'] = 15; $lang->block->default['project']['4']['params']['orderBy'] = 'id_desc'; $lang->block->default['project']['4']['params']['type'] = 'assignedTo'; +$lang->block->default['project']['5']['title'] = 'Build List'; +$lang->block->default['project']['5']['block'] = 'build'; +$lang->block->default['project']['5']['grid'] = 8; + +$lang->block->default['project']['5']['params']['count'] = 15; +$lang->block->default['project']['5']['params']['orderBy'] = 'id_desc'; + $lang->block->default['qa']['1']['title'] = 'Test Report'; $lang->block->default['qa']['1']['block'] = 'statistic'; $lang->block->default['qa']['1']['grid'] = 8; diff --git a/module/block/lang/fr.php b/module/block/lang/fr.php index afa251dc2e..244783176f 100644 --- a/module/block/lang/fr.php +++ b/module/block/lang/fr.php @@ -218,6 +218,13 @@ $lang->block->default['project']['4']['params']['count'] = 15; $lang->block->default['project']['4']['params']['orderBy'] = 'id_desc'; $lang->block->default['project']['4']['params']['type'] = 'assignedTo'; +$lang->block->default['project']['5']['title'] = 'Build List'; +$lang->block->default['project']['5']['block'] = 'build'; +$lang->block->default['project']['5']['grid'] = 8; + +$lang->block->default['project']['5']['params']['count'] = 15; +$lang->block->default['project']['5']['params']['orderBy'] = 'id_desc'; + $lang->block->default['qa']['1']['title'] = 'Rapport de Tests'; $lang->block->default['qa']['1']['block'] = 'statistic'; $lang->block->default['qa']['1']['grid'] = 8; diff --git a/module/block/lang/vi.php b/module/block/lang/vi.php index 5e128b42a5..2c1145fbeb 100644 --- a/module/block/lang/vi.php +++ b/module/block/lang/vi.php @@ -217,6 +217,13 @@ $lang->block->default['project']['4']['params']['count'] = 15; $lang->block->default['project']['4']['params']['orderBy'] = 'id_desc'; $lang->block->default['project']['4']['params']['type'] = 'assignedTo'; +$lang->block->default['project']['5']['title'] = 'Build List'; +$lang->block->default['project']['5']['block'] = 'build'; +$lang->block->default['project']['5']['grid'] = 8; + +$lang->block->default['project']['5']['params']['count'] = 15; +$lang->block->default['project']['5']['params']['orderBy'] = 'id_desc'; + $lang->block->default['qa']['1']['title'] = 'Báo cáo Test'; $lang->block->default['qa']['1']['block'] = 'statistic'; $lang->block->default['qa']['1']['grid'] = 8; diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php index dac66606d7..9ff78df9d3 100644 --- a/module/block/lang/zh-cn.php +++ b/module/block/lang/zh-cn.php @@ -217,6 +217,13 @@ $lang->block->default['project']['4']['params']['count'] = 15; $lang->block->default['project']['4']['params']['orderBy'] = 'id_desc'; $lang->block->default['project']['4']['params']['type'] = 'assignedTo'; +$lang->block->default['project']['5']['title'] = '版本列表'; +$lang->block->default['project']['5']['block'] = 'build'; +$lang->block->default['project']['5']['grid'] = 8; + +$lang->block->default['project']['5']['params']['count'] = 15; +$lang->block->default['project']['5']['params']['orderBy'] = 'id_desc'; + $lang->block->default['qa']['1']['title'] = '测试统计'; $lang->block->default['qa']['1']['block'] = 'statistic'; $lang->block->default['qa']['1']['grid'] = 8; diff --git a/module/block/view/scrumoverviewblock.html.php b/module/block/view/scrumoverviewblock.html.php index 5e6569b97d..64679c4b90 100644 --- a/module/block/view/scrumoverviewblock.html.php +++ b/module/block/view/scrumoverviewblock.html.php @@ -56,7 +56,7 @@
block->totalStory;?>
- allStories ? html::a($this->createLink('project', 'story', 'projectID=' . $projectID), $totalData[$projectID]->allStories) : 0;?> + allStories;?>
diff --git a/module/build/control.php b/module/build/control.php index 232507f060..98cad7ebf5 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -33,35 +33,29 @@ class build extends control $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('build', 'view', "buildID=$buildID"))); } - $this->session->set('buildCreate', $this->app->getURI(true)); - /* Load these models. */ $this->loadModel('project'); $this->loadModel('user'); - + + $this->session->set('buildCreate', $this->app->getURI(true)); + $execution = $this->loadModel('project')->getExecutionById($executionID); + /* Set menu. */ $executions = $this->project->getExecutionPairs($this->session->PRJ); $this->project->setMenu($executions, $executionID); - /* Get stories and bugs. */ - $orderBy = 'status_asc, stage_asc, id_desc'; - - /* Assign. */ - $project = $this->loadModel('project')->getExecutionById($executionID); - $productGroups = $this->project->getProducts($executionID); $productID = $productID ? $productID : key($productGroups); $products = array(); foreach($productGroups as $product) $products[$product->id] = $product->name; - $this->view->title = $project->name . $this->lang->colon . $this->lang->build->create; - $this->view->position[] = html::a($this->createLink('project', 'task', "projectID=$executionID"), $project->name); + $this->view->title = $execution->name . $this->lang->colon . $this->lang->build->create; + $this->view->position[] = html::a($this->createLink('project', 'task', "projectID=$executionID"), $execution->name); $this->view->position[] = $this->lang->build->create; $this->view->product = isset($productGroups[$productID]) ? $productGroups[$productID] : ''; $this->view->branches = (isset($productGroups[$productID]) and $productGroups[$productID]->type == 'normal') ? array() : $this->loadModel('branch')->getPairs($productID); $this->view->executionID = $executionID; - $this->view->orderBy = $orderBy; $this->view->products = $products; $this->view->lastBuild = $this->build->getLast($executionID); $this->view->productGroups = $productGroups; diff --git a/module/my/view/story.html.php b/module/my/view/story.html.php index 536e9b7d35..e3532c8443 100644 --- a/module/my/view/story.html.php +++ b/module/my/view/story.html.php @@ -1,19 +1,19 @@ - * @package dashboard - * @version $Id: story.html.php 5116 2013-07-12 06:37:48Z chencongzhi520@gmail.com $ + * @package my + * @version $Id * @link http://www.zentao.net */ ?>