diff --git a/module/product/control.php b/module/product/control.php index 1929604363..e7bdc869b0 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -1180,6 +1180,7 @@ class product extends control $this->view->projectList = $projectList; $this->view->projectProduct = $projectProduct; $this->view->latestExecutions = $projectLatestExecutions; + $this->view->executionList = $executionList; $this->view->hourList = $hourList; $this->view->emptyHour = (object) array('totalEstimate' => 0, 'totalConsumed' => 0, 'totalLeft' => 0, 'progress' => 0); $this->view->releaseList = $releaseList; diff --git a/module/product/js/kanban.js b/module/product/js/kanban.js index 03b1235105..23c7693321 100644 --- a/module/product/js/kanban.js +++ b/module/product/js/kanban.js @@ -68,14 +68,14 @@ function processKanbanData(key, programsData) { /* doing execution */ items.doingExecution = []; - var productProjects = projectProduct[productID]; - if(productProjects) + var productExecutions = classicExecution[productID]; + if(productExecutions) { - $.each(productProjects, function(projectID) + console.log(productExecutions); + $.each(productExecutions, function(executionID, execution) { - var execution = latestExecutions[projectID]; if(!execution || !execution.id) return; - var executionItem = $.extend({}, execution, {id: 'execution-' + execution.id, _id: execution.id}); + var executionItem = $.extend({}, execution, {id: 'execution-' + executionID, _id: executionID}); items.doingExecution.push(executionItem); }); } @@ -115,7 +115,6 @@ function processKanbanData(key, programsData) */ function renderDoingProjectItem(item, $item) { - console.log('renderDoingProjectItem', item); $item.removeClass('kanban-item').addClass('project-row clearfix').empty(); var $projectCol = $('
').appendTo($item); diff --git a/module/product/lang/en.php b/module/product/lang/en.php index b319ce82d1..06a81f8144 100644 --- a/module/product/lang/en.php +++ b/module/product/lang/en.php @@ -132,15 +132,16 @@ $lang->product->unplan = 'Unplanned'; $lang->product->viewByUser = 'By User'; /* Product Kanban. */ -$lang->product->myProduct = 'Products Ownedbyme'; -$lang->product->otherProduct = 'Other Products'; -$lang->product->unclosedProduct = 'Open Products'; -$lang->product->unexpiredPlan = 'Unexpired Plans'; -$lang->product->doing = 'Doing'; -$lang->product->doingProject = 'Ongoing Projects'; -$lang->product->doingExecution = 'Ongoing Executions'; -$lang->product->normalRelease = 'Normal Releases'; -$lang->product->emptyProgram = 'Independent Products'; +$lang->product->myProduct = 'Products Ownedbyme'; +$lang->product->otherProduct = 'Other Products'; +$lang->product->unclosedProduct = 'Open Products'; +$lang->product->unexpiredPlan = 'Unexpired Plans'; +$lang->product->doing = 'Doing'; +$lang->product->doingProject = 'Ongoing Projects'; +$lang->product->doingExecution = 'Ongoing Executions'; +$lang->product->doingClassicExecution = 'Ongoing ' . $lang->executionCommon; +$lang->product->normalRelease = 'Normal Releases'; +$lang->product->emptyProgram = 'Independent Products'; $lang->product->allStory = 'All '; $lang->product->allProduct = 'All'; diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php index 2ee9374a64..42d4aad2bf 100644 --- a/module/product/lang/zh-cn.php +++ b/module/product/lang/zh-cn.php @@ -132,15 +132,16 @@ $lang->product->unplan = "未计划"; $lang->product->viewByUser = '按用户查看'; /* Product Kanban. */ -$lang->product->myProduct = '我负责的产品'; -$lang->product->otherProduct = '其他产品'; -$lang->product->unclosedProduct = '未关闭的产品'; -$lang->product->unexpiredPlan = '未过期的计划'; -$lang->product->doing = '进行中'; -$lang->product->doingProject = '进行中的项目'; -$lang->product->doingExecution = '进行中的执行'; -$lang->product->normalRelease = '正常的发布'; -$lang->product->emptyProgram = '无项目集归属产品'; +$lang->product->myProduct = '我负责的' . $lang->productCommon; +$lang->product->otherProduct = '其他' . $lang->productCommon; +$lang->product->unclosedProduct = '未关闭的' . $lang->productCommon; +$lang->product->unexpiredPlan = '未过期的计划'; +$lang->product->doing = '进行中'; +$lang->product->doingProject = '进行中的项目'; +$lang->product->doingExecution = '进行中的执行'; +$lang->product->doingClassicExecution = '进行中的' . $lang->executionCommon; +$lang->product->normalRelease = '正常的发布'; +$lang->product->emptyProgram = '无项目集归属产品'; $lang->product->allStory = '所有'; $lang->product->allProduct = '全部' . $lang->productCommon; diff --git a/module/product/lang/zh-tw.php b/module/product/lang/zh-tw.php index 11a2fb0777..ee420e40ad 100644 --- a/module/product/lang/zh-tw.php +++ b/module/product/lang/zh-tw.php @@ -132,15 +132,16 @@ $lang->product->unplan = "未計劃"; $lang->product->viewByUser = '按用戶查看'; /* Product Kanban. */ -$lang->product->myProduct = '我負責的產品'; -$lang->product->otherProduct = '其他產品'; -$lang->product->unclosedProduct = '未關閉的產品'; -$lang->product->unexpiredPlan = '未過期的計劃'; -$lang->product->doing = '進行中'; -$lang->product->doingProject = '進行中的項目'; -$lang->product->doingExecution = '進行中的執行'; -$lang->product->normalRelease = '正常的發布'; -$lang->product->emptyProgram = '無項目集歸屬產品'; +$lang->product->myProduct = '我負責的產品'; +$lang->product->otherProduct = '其他產品'; +$lang->product->unclosedProduct = '未關閉的產品'; +$lang->product->unexpiredPlan = '未過期的計劃'; +$lang->product->doing = '進行中'; +$lang->product->doingProject = '進行中的項目'; +$lang->product->doingExecution = '進行中的執行'; +$lang->product->doingClassicExecution = '進行中的' . $lang->executionCommon; +$lang->product->normalRelease = '正常的發布'; +$lang->product->emptyProgram = '無項目集歸屬產品'; $lang->product->allStory = '所有'; $lang->product->allProduct = '全部' . $lang->productCommon; diff --git a/module/product/model.php b/module/product/model.php index ff9d2d910e..54d363dcd5 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -1526,7 +1526,7 @@ class productModel extends model * Get stats for product kanban. * * @access public - * @return void + * @return array */ public function getStats4Kanban() { @@ -1571,8 +1571,19 @@ class productModel extends model { foreach($executionList as $projectID => $executions) { + /* Used to computer execution progress. */ $latestExecutionList[key($executions)] = current($executions); - $projectLatestExecutions[$projectID] = current($executions); + + /* Used for display in page. */ + $projectLatestExecutions[$projectID] = current($executions); + } + } + + if($this->config->systemMode == 'classic') + { + foreach($executionList as $productID => $executions) + { + foreach($executions as $executionID => $execution) $latestExecutionList[$executionID] = $execution; } } diff --git a/module/product/view/kanban.html.php b/module/product/view/kanban.html.php index eb4591bc68..ff6fdd222b 100644 --- a/module/product/view/kanban.html.php +++ b/module/product/view/kanban.html.php @@ -39,7 +39,7 @@ if($config->systemMode == 'new') } else { - $kanbanColumns['doingExecution'] = array('name' => $lang->product->doing, 'type' => 'doingExecution'); + $kanbanColumns['doingExecution'] = array('name' => $lang->product->doingClassicExecution, 'type' => 'doingExecution'); } $kanbanColumns['normalRelease'] = array('name' => $lang->product->normalRelease, 'type' => 'normalRelease'); $userPrivs = array(); @@ -57,6 +57,7 @@ js::set('planList', $planList); js::set('projectList', $projectList); js::set('projectProduct', $projectProduct); js::set('latestExecutions', $latestExecutions); +js::set('classicExecution', $executionList); js::set('releaseList', $releaseList); js::set('hourList', $hourList); js::set('doingText', $lang->product->doing);