diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index 0f56d1ae14..2c616fd631 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -360,16 +360,16 @@ $lang->doc->menuOrder[30] = 'create'; /* Report menu.*/ $lang->report->menu = new stdclass(); -$lang->report->menu->annual = array('link' => "{$lang->report->annual}|report|annualData|year=&dept=&userID=" . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank'); -$lang->report->menu->product = array('link' => "{$lang->product->common}|report|productsummary"); -$lang->report->menu->execution = array('link' => "{$lang->execution->common}|report|executiondeviation"); -$lang->report->menu->test = array('link' => "{$lang->qa->common}|report|bugcreate", 'alias' => 'bugassign'); -$lang->report->menu->staff = array('link' => "{$lang->system->common}|report|workload"); +$lang->report->menu->annual = array('link' => "{$lang->report->annual}|report|annualData|year=&dept=&userID=" . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank'); +$lang->report->menu->product = array('link' => "{$lang->product->common}|report|productsummary"); +$lang->report->menu->project = array('link' => "{$lang->project->common}|report|projectdeviation"); +$lang->report->menu->test = array('link' => "{$lang->qa->common}|report|bugcreate", 'alias' => 'bugassign'); +$lang->report->menu->staff = array('link' => "{$lang->system->common}|report|workload"); /* Report menu order. */ $lang->report->menuOrder[5] = 'annual'; $lang->report->menuOrder[10] = 'product'; -$lang->report->menuOrder[15] = 'execution'; +$lang->report->menuOrder[15] = 'project'; $lang->report->menuOrder[20] = 'test'; $lang->report->menuOrder[25] = 'staff'; diff --git a/module/report/control.php b/module/report/control.php index 32ac76ae64..f1af84c646 100644 --- a/module/report/control.php +++ b/module/report/control.php @@ -37,7 +37,7 @@ class report extends control } /** - * The index of report, goto execution deviation. + * The index of report, goto project deviation. * * @access public * @return void @@ -48,23 +48,23 @@ class report extends control } /** - * Execution deviation report. + * Project deviation report. * * @access public * @return void */ - public function executionDeviation($begin = 0, $end = 0) + public function projectDeviation($begin = 0, $end = 0) { $begin = $begin ? date('Y-m-d', strtotime($begin)) : ''; $end = $end ? date('Y-m-d', strtotime($end)) : ''; - $this->view->title = $this->lang->report->executionDeviation; - $this->view->position[] = $this->lang->report->executionDeviation; + $this->view->title = $this->lang->report->projectDeviation; + $this->view->position[] = $this->lang->report->projectDeviation; - $this->view->executions = $this->report->getExecutions($begin, $end); - $this->view->begin = $begin; - $this->view->end = $end; - $this->view->submenu = 'execution'; + $this->view->projects = $this->report->getProjects($begin, $end); + $this->view->begin = $begin; + $this->view->end = $end; + $this->view->submenu = 'project'; $this->display(); } diff --git a/module/report/js/executiondeviation.js b/module/report/js/projectdeviation.js similarity index 85% rename from module/report/js/executiondeviation.js rename to module/report/js/projectdeviation.js index a693a947ac..2d979b1d73 100644 --- a/module/report/js/executiondeviation.js +++ b/module/report/js/projectdeviation.js @@ -23,6 +23,6 @@ function changeDate(begin, end) end = end + endarray[i]; } } - link = createLink('report', 'executiondeviation', 'begin=' + begin + '&end=' + end); + link = createLink('report', 'projectdeviation', 'begin=' + begin + '&end=' + end); location.href=link; } diff --git a/module/report/lang/de.php b/module/report/lang/de.php index 068205cd5a..1969bc86ec 100644 --- a/module/report/lang/de.php +++ b/module/report/lang/de.php @@ -18,7 +18,7 @@ $lang->report->percent = '%'; $lang->report->undefined = 'Undefiniert'; $lang->report->query = 'Abfrage'; $lang->report->annual = 'Annual Summary'; -$lang->report->executionCommon = 'Execution'; +$lang->report->project = 'Project'; $lang->report->colors[] = 'AFD8F8'; $lang->report->colors[] = 'F6BD0F'; @@ -38,30 +38,30 @@ $lang->report->assign['assign'] = 'Zugeordnet'; $lang->report->singleColor[] = 'F6BD0F'; -$lang->report->executionDeviation = 'Durchgeführt Abweichung'; -$lang->report->productSummary = $lang->productCommon . ' Zusammenfassung'; -$lang->report->bugCreate = 'Bug gemeldet'; -$lang->report->bugAssign = 'Bug zugeordnet'; -$lang->report->workload = 'Team Arbeitslast '; -$lang->report->workloadAB = 'Arbeitslast'; -$lang->report->bugOpenedDate = 'Bug gemeldet am'; -$lang->report->beginAndEnd = ' : von'; -$lang->report->begin = 'Begin'; -$lang->report->end = 'End'; -$lang->report->dept = 'Abteilung'; -$lang->report->deviationChart = 'Durchgeführt Abweichnungs Chart'; +$lang->report->projectDeviation = 'Projektabweichungsbericht'; +$lang->report->productSummary = $lang->productCommon . ' Zusammenfassung'; +$lang->report->bugCreate = 'Bug gemeldet'; +$lang->report->bugAssign = 'Bug zugeordnet'; +$lang->report->workload = 'Team Arbeitslast '; +$lang->report->workloadAB = 'Arbeitslast'; +$lang->report->bugOpenedDate = 'Bug gemeldet am'; +$lang->report->beginAndEnd = ' : von'; +$lang->report->begin = 'Begin'; +$lang->report->end = 'End'; +$lang->report->dept = 'Abteilung'; +$lang->report->deviationChart = 'Projektabweichungskurve'; $lang->reportList = new stdclass(); -$lang->reportList->execution = new stdclass(); +$lang->reportList->project = new stdclass(); $lang->reportList->product = new stdclass(); $lang->reportList->test = new stdclass(); $lang->reportList->staff = new stdclass(); -$lang->reportList->execution->lists[10] = 'Durchgeführt Abweichnung|report|executiondeviation'; -$lang->reportList->product->lists[10] = $lang->productCommon . ' Zusammenfassung|report|productsummary'; -$lang->reportList->test->lists[10] = 'Bugs gemeldet|report|bugcreate'; -$lang->reportList->test->lists[13] = 'Bugs zugeordnet|report|bugassign'; -$lang->reportList->staff->lists[10] = 'Team Arbeitslast|report|workload'; +$lang->reportList->project->lists[10] = 'Durchgeführt Abweichnung|reportprojectdeviation'; +$lang->reportList->product->lists[10] = $lang->productCommon . ' Zusammenfassung|report|productsummary'; +$lang->reportList->test->lists[10] = 'Bugs gemeldet|report|bugcreate'; +$lang->reportList->test->lists[13] = 'Bugs zugeordnet|report|bugassign'; +$lang->reportList->staff->lists[10] = 'Team Arbeitslast|report|workload'; $lang->report->id = 'ID'; $lang->report->execution = $lang->executionCommon; diff --git a/module/report/lang/en.php b/module/report/lang/en.php index 7868b6f881..6030802d21 100644 --- a/module/report/lang/en.php +++ b/module/report/lang/en.php @@ -18,7 +18,7 @@ $lang->report->percent = '%'; $lang->report->undefined = 'Undefined'; $lang->report->query = 'Query'; $lang->report->annual = 'Annual Summary'; -$lang->report->executionCommon = 'Execution'; +$lang->report->project = 'Project'; $lang->report->colors[] = 'AFD8F8'; $lang->report->colors[] = 'F6BD0F'; @@ -38,30 +38,30 @@ $lang->report->assign['assign'] = 'Assigned'; $lang->report->singleColor[] = 'F6BD0F'; -$lang->report->executionDeviation = 'Execution Deviation'; -$lang->report->productSummary = $lang->productCommon . ' Summary'; -$lang->report->bugCreate = 'Bug Reported Summary'; -$lang->report->bugAssign = 'Bug Assigned Summary'; -$lang->report->workload = 'Team Workload Summary'; -$lang->report->workloadAB = 'Workload'; -$lang->report->bugOpenedDate = 'Bug reported from'; -$lang->report->begin = 'Begin'; -$lang->report->end = 'End'; -$lang->report->beginAndEnd = ' From'; -$lang->report->dept = 'Department'; -$lang->report->deviationChart = 'Execution Deviation Chart'; +$lang->report->projectDeviation = 'Project Deviation'; +$lang->report->productSummary = $lang->productCommon . ' Summary'; +$lang->report->bugCreate = 'Bug Reported Summary'; +$lang->report->bugAssign = 'Bug Assigned Summary'; +$lang->report->workload = 'Team Workload Summary'; +$lang->report->workloadAB = 'Workload'; +$lang->report->bugOpenedDate = 'Bug reported from'; +$lang->report->begin = 'Begin'; +$lang->report->end = 'End'; +$lang->report->beginAndEnd = ' From'; +$lang->report->dept = 'Department'; +$lang->report->deviationChart = 'Project Deviation Chart'; $lang->reportList = new stdclass(); -$lang->reportList->execution = new stdclass(); -$lang->reportList->product = new stdclass(); -$lang->reportList->test = new stdclass(); -$lang->reportList->staff = new stdclass(); +$lang->reportList->project = new stdclass(); +$lang->reportList->product = new stdclass(); +$lang->reportList->test = new stdclass(); +$lang->reportList->staff = new stdclass(); -$lang->reportList->execution->lists[10] = 'Execution Deviation|report|executiondeviation'; -$lang->reportList->product->lists[10] = $lang->productCommon . ' Summary|report|productsummary'; -$lang->reportList->test->lists[10] = 'Bug Reported Summary|report|bugcreate'; -$lang->reportList->test->lists[13] = 'Bug Assigned Summary|report|bugassign'; -$lang->reportList->staff->lists[10] = 'Team Workload Summary|report|workload'; +$lang->reportList->project->lists[10] = 'Execution Deviation|report|projectdeviation'; +$lang->reportList->product->lists[10] = $lang->productCommon . ' Summary|report|productsummary'; +$lang->reportList->test->lists[10] = 'Bug Reported Summary|report|bugcreate'; +$lang->reportList->test->lists[13] = 'Bug Assigned Summary|report|bugassign'; +$lang->reportList->staff->lists[10] = 'Team Workload Summary|report|workload'; $lang->report->id = 'ID'; $lang->report->execution = $lang->executionCommon; diff --git a/module/report/lang/fr.php b/module/report/lang/fr.php index 276e4101b6..6e3ccd0c0c 100644 --- a/module/report/lang/fr.php +++ b/module/report/lang/fr.php @@ -18,7 +18,7 @@ $lang->report->percent = '%'; $lang->report->undefined = 'N/D'; $lang->report->query = 'Requête'; $lang->report->annual = 'Résumé Annuel'; -$lang->report->executionCommon = 'Execution'; +$lang->report->project = 'Project'; $lang->report->colors[] = 'AFD8F8'; $lang->report->colors[] = 'F6BD0F'; @@ -38,30 +38,30 @@ $lang->report->assign['assign'] = 'Affecté'; $lang->report->singleColor[] = 'F6BD0F'; -$lang->report->executionDeviation = 'Dérive Effectué'; -$lang->report->productSummary = 'Résumé ' . $lang->productCommon; -$lang->report->bugCreate = 'Résumé remontée Bugs'; -$lang->report->bugAssign = 'Résumé affectation Bugs'; -$lang->report->workload = 'Résumé charge travail'; -$lang->report->workloadAB = 'Charge Travail'; -$lang->report->bugOpenedDate = 'Bugs signalés de'; -$lang->report->beginAndEnd = ' de'; -$lang->report->begin = 'Begin'; -$lang->report->end = 'End'; -$lang->report->dept = 'Compartiment'; -$lang->report->deviationChart = 'Graphique de Dérive d uEffectué' ; +$lang->report->projectDeviation = 'Rapport de déviation du projet'; +$lang->report->productSummary = 'Résumé ' . $lang->productCommon; +$lang->report->bugCreate = 'Résumé remontée Bugs'; +$lang->report->bugAssign = 'Résumé affectation Bugs'; +$lang->report->workload = 'Résumé charge travail'; +$lang->report->workloadAB = 'Charge Travail'; +$lang->report->bugOpenedDate = 'Bugs signalés de'; +$lang->report->beginAndEnd = ' de'; +$lang->report->begin = 'Begin'; +$lang->report->end = 'End'; +$lang->report->dept = 'Compartiment'; +$lang->report->deviationChart = 'Courbe de déviation du projet'; $lang->reportList = new stdclass(); -$lang->reportList->execution = new stdclass(); -$lang->reportList->product = new stdclass(); -$lang->reportList->test = new stdclass(); -$lang->reportList->staff = new stdclass(); +$lang->reportList->project = new stdclass(); +$lang->reportList->product = new stdclass(); +$lang->reportList->test = new stdclass(); +$lang->reportList->staff = new stdclass(); -$lang->reportList->execution->lists[10] = 'Dériv Effectué|report|executiondeviation'; -$lang->reportList->product->lists[10] = 'Résumé ' . $lang->productCommon . '|report|productsummary'; -$lang->reportList->test->lists[10] = 'Résumé remontée Bugs|report|bugcreate'; -$lang->reportList->test->lists[13] = 'Résumé affectation Bugs|report|bugassign'; -$lang->reportList->staff->lists[10] = 'Résumé charge travail|report|workload'; +$lang->reportList->project->lists[10] = 'Dériv Effectué|report|projectdeviation'; +$lang->reportList->product->lists[10] = 'Résumé ' . $lang->productCommon . '|report|productsummary'; +$lang->reportList->test->lists[10] = 'Résumé remontée Bugs|report|bugcreate'; +$lang->reportList->test->lists[13] = 'Résumé affectation Bugs|report|bugassign'; +$lang->reportList->staff->lists[10] = 'Résumé charge travail|report|workload'; $lang->report->id = 'ID'; $lang->report->execution = $lang->executionCommon; diff --git a/module/report/lang/vi.php b/module/report/lang/vi.php index e66560113a..ea645b67ab 100644 --- a/module/report/lang/vi.php +++ b/module/report/lang/vi.php @@ -9,16 +9,16 @@ * @version $Id: vi.php 5080 2013-07-10 00:46:59Z wyd621@gmail.com $ * @link http://www.zentao.net */ -$lang->report->common = 'Báo cáo'; -$lang->report->index = 'Trang báo cáo'; -$lang->report->list = 'Báo cáo'; -$lang->report->item = 'Hạng mục'; -$lang->report->value = 'Giá trị'; -$lang->report->percent = '%'; -$lang->report->undefined = 'Chưa định nghĩa'; -$lang->report->query = 'Truy vấn'; -$lang->report->annual = 'Tóm tắt theo năm'; -$lang->report->executionCommon = 'Execution'; +$lang->report->common = 'Báo cáo'; +$lang->report->index = 'Trang báo cáo'; +$lang->report->list = 'Báo cáo'; +$lang->report->item = 'Hạng mục'; +$lang->report->value = 'Giá trị'; +$lang->report->percent = '%'; +$lang->report->undefined = 'Chưa định nghĩa'; +$lang->report->query = 'Truy vấn'; +$lang->report->annual = 'Tóm tắt theo năm'; +$lang->report->project = 'Project'; $lang->report->colors[] = 'AFD8F8'; $lang->report->colors[] = 'F6BD0F'; @@ -38,30 +38,30 @@ $lang->report->assign['assign'] = 'Đã giao'; $lang->report->singleColor[] = 'F6BD0F'; -$lang->report->executionDeviation = 'Độ lệch thực hiện'; -$lang->report->productSummary = 'Tóm tắt '.$lang->productCommon; -$lang->report->bugCreate = 'Báo cáo Bug'; -$lang->report->bugAssign = 'Bàn giao Bug'; -$lang->report->workload = 'Lượng công việc đội nhóm'; -$lang->report->workloadAB = 'Lượng công việc'; -$lang->report->bugOpenedDate = 'Bug được báo cáo từ'; -$lang->report->beginAndEnd = ' từ'; -$lang->report->begin = 'Begin'; -$lang->report->end = 'End'; -$lang->report->dept = 'Phòng/Ban'; -$lang->report->deviationChart = 'Biểu đồ chênh lệcthực hiệnh'; +$lang->report->projectDeviation = 'Độ lệch thực hiện'; +$lang->report->productSummary = 'Tóm tắt '.$lang->productCommon; +$lang->report->bugCreate = 'Báo cáo Bug'; +$lang->report->bugAssign = 'Bàn giao Bug'; +$lang->report->workload = 'Lượng công việc đội nhóm'; +$lang->report->workloadAB = 'Lượng công việc'; +$lang->report->bugOpenedDate = 'Bug được báo cáo từ'; +$lang->report->beginAndEnd = ' từ'; +$lang->report->begin = 'Begin'; +$lang->report->end = 'End'; +$lang->report->dept = 'Phòng/Ban'; +$lang->report->deviationChart = 'Biểu đồ chênh lệcthực hiệnh'; $lang->reportList = new stdclass(); -$lang->reportList->execution = new stdclass(); -$lang->reportList->product = new stdclass(); -$lang->reportList->test = new stdclass(); -$lang->reportList->staff = new stdclass(); +$lang->reportList->project = new stdclass(); +$lang->reportList->product = new stdclass(); +$lang->reportList->test = new stdclass(); +$lang->reportList->staff = new stdclass(); -$lang->reportList->execution->lists[10] = 'Chênh lệchthực hiện|report|executiondeviation'; -$lang->reportList->product->lists[10] = 'Tóm tắt '.$lang->productCommon . '|report|productsummary'; -$lang->reportList->test->lists[10] = 'Báo cáo Bug|report|bugcreate'; -$lang->reportList->test->lists[13] = 'Bàn giao Bug|report|bugassign'; -$lang->reportList->staff->lists[10] = 'Lượng công việc đội nhóm|report|workload'; +$lang->reportList->project->lists[10] = 'Chênh lệchthực hiện|reportprojectdeviation'; +$lang->reportList->product->lists[10] = 'Tóm tắt '.$lang->productCommon . '|report|productsummary'; +$lang->reportList->test->lists[10] = 'Báo cáo Bug|report|bugcreate'; +$lang->reportList->test->lists[13] = 'Bàn giao Bug|report|bugassign'; +$lang->reportList->staff->lists[10] = 'Lượng công việc đội nhóm|report|workload'; $lang->report->id = 'ID'; $lang->report->execution = $lang->executionCommon; diff --git a/module/report/lang/zh-cn.php b/module/report/lang/zh-cn.php index 063fc127d0..92a9f0cde2 100644 --- a/module/report/lang/zh-cn.php +++ b/module/report/lang/zh-cn.php @@ -9,16 +9,16 @@ * @version $Id: zh-cn.php 5080 2013-07-10 00:46:59Z wyd621@gmail.com $ * @link http://www.zentao.net */ -$lang->report->common = '统计视图'; -$lang->report->index = '统计首页'; -$lang->report->list = '统计报表'; -$lang->report->item = '条目'; -$lang->report->value = '值'; -$lang->report->percent = '百分比'; -$lang->report->undefined = '未设定'; -$lang->report->query = '查询'; -$lang->report->annual = '年度总结'; -$lang->report->executionCommon = '执行'; +$lang->report->common = '统计视图'; +$lang->report->index = '统计首页'; +$lang->report->list = '统计报表'; +$lang->report->item = '条目'; +$lang->report->value = '值'; +$lang->report->percent = '百分比'; +$lang->report->undefined = '未设定'; +$lang->report->query = '查询'; +$lang->report->annual = '年度总结'; +$lang->report->project = '项目'; $lang->report->colors[] = 'AFD8F8'; $lang->report->colors[] = 'F6BD0F'; @@ -38,30 +38,30 @@ $lang->report->assign['assign'] = '已指派'; $lang->report->singleColor[] = 'F6BD0F'; -$lang->report->executionDeviation = '执行偏差报表'; -$lang->report->productSummary = $lang->productCommon . '汇总表'; -$lang->report->bugCreate = 'Bug创建表'; -$lang->report->bugAssign = 'Bug指派表'; -$lang->report->workload = '员工负载表'; -$lang->report->workloadAB = '工作负载'; -$lang->report->bugOpenedDate = 'Bug创建时间'; -$lang->report->beginAndEnd = '起止时间'; -$lang->report->begin = '起始日期'; -$lang->report->end = '结束日期'; -$lang->report->dept = '部门'; -$lang->report->deviationChart = '执行偏差曲线'; +$lang->report->projectDeviation = '项目偏差报表'; +$lang->report->productSummary = $lang->productCommon . '汇总表'; +$lang->report->bugCreate = 'Bug创建表'; +$lang->report->bugAssign = 'Bug指派表'; +$lang->report->workload = '员工负载表'; +$lang->report->workloadAB = '工作负载'; +$lang->report->bugOpenedDate = 'Bug创建时间'; +$lang->report->beginAndEnd = '起止时间'; +$lang->report->begin = '起始日期'; +$lang->report->end = '结束日期'; +$lang->report->dept = '部门'; +$lang->report->deviationChart = '项目偏差曲线'; $lang->reportList = new stdclass(); -$lang->reportList->execution = new stdclass(); -$lang->reportList->product = new stdclass(); -$lang->reportList->test = new stdclass(); -$lang->reportList->staff = new stdclass(); +$lang->reportList->project = new stdclass(); +$lang->reportList->product = new stdclass(); +$lang->reportList->test = new stdclass(); +$lang->reportList->staff = new stdclass(); -$lang->reportList->execution->lists[10] = '执行偏差报表|report|executiondeviation'; -$lang->reportList->product->lists[10] = $lang->productCommon . '汇总表|report|productsummary'; -$lang->reportList->test->lists[10] = 'Bug创建表|report|bugcreate'; -$lang->reportList->test->lists[13] = 'Bug指派表|report|bugassign'; -$lang->reportList->staff->lists[10] = '员工负载表|report|workload'; +$lang->reportList->project->lists[10] = '项目偏差报表|report|projectdeviation'; +$lang->reportList->product->lists[10] = $lang->productCommon . '汇总表|report|productsummary'; +$lang->reportList->test->lists[10] = 'Bug创建表|report|bugcreate'; +$lang->reportList->test->lists[13] = 'Bug指派表|report|bugassign'; +$lang->reportList->staff->lists[10] = '员工负载表|report|workload'; $lang->report->id = '编号'; $lang->report->execution = $lang->executionCommon; diff --git a/module/report/model.php b/module/report/model.php index 9dd3f49f5a..91572d5626 100644 --- a/module/report/model.php +++ b/module/report/model.php @@ -91,16 +91,18 @@ class reportModel extends model /** * Get executions. * + * @param string $begin + * @param string $end * @access public * @return void */ - public function getExecutions($begin = 0, $end = 0) + public function getProjects($begin = 0, $end = 0) { - $tasks = $this->dao->select('t1.*,t2.name as executionName')->from(TABLE_TASK)->alias('t1') - ->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.execution = t2.id') + $tasks = $this->dao->select('t1.*,t2.name as projectName')->from(TABLE_TASK)->alias('t1') + ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') ->where('t1.status')->ne('cancel') ->andWhere('t1.deleted')->eq(0) - ->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi() + ->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->projects)->fi() ->andWhere('t2.deleted')->eq(0) ->andWhere('t1.parent')->lt(1) ->andWhere('t2.status')->eq('closed') @@ -109,23 +111,23 @@ class reportModel extends model ->orderBy('t2.end_desc') ->fetchAll(); - $executions = array(); + $projects = array(); foreach($tasks as $task) { - $executionID = $task->execution; - if(!isset($executions[$executionID])) + $projectID = $task->project; + if(!isset($projects[$projectID])) { - $executions[$executionID] = new stdclass(); - $executions[$executionID]->estimate = 0; - $executions[$executionID]->consumed = 0; + $projects[$projectID] = new stdclass(); + $projects[$projectID]->estimate = 0; + $projects[$projectID]->consumed = 0; } - $executions[$executionID]->name = $task->executionName; - $executions[$executionID]->estimate += $task->estimate; - $executions[$executionID]->consumed += $task->consumed; + $projects[$projectID]->name = $task->executionName; + $projects[$projectID]->estimate += $task->estimate; + $projects[$projectID]->consumed += $task->consumed; } - return $executions; + return $projects; } /** diff --git a/module/report/view/executiondeviation.html.php b/module/report/view/projectdeviation.html.php similarity index 86% rename from module/report/view/executiondeviation.html.php rename to module/report/view/projectdeviation.html.php index 073e87bf90..dbe549e177 100644 --- a/module/report/view/executiondeviation.html.php +++ b/module/report/view/projectdeviation.html.php @@ -11,19 +11,19 @@
- report->executionCommon . $lang->report->begin;?> + report->project . $lang->report->begin;?>
- report->executionCommon . $lang->report->end;?> + report->project . $lang->report->end;?>
- +

error->noData;?>

@@ -37,11 +37,11 @@
- +
- + @@ -49,13 +49,13 @@ - $execution):?> + $project):?> - - - - consumed - $execution->estimate;?> + + + + consumed - $project->estimate;?>
report->id;?>report->execution;?>report->project;?> report->estimate;?> report->consumed;?> report->deviation;?>
createLink('execution', 'view', "executionID=$id"), $execution->name);?>estimate;?>consumed;?>createLink('project', 'view', "projectID=$id"), $project->name);?>estimate;?>consumed;?> 0) @@ -74,7 +74,7 @@ estimate ? round($deviation / $execution->estimate * 100, 2) : 'n/a'; + $num = $project->estimate ? round($deviation / $project->estimate * 100, 2) : 'n/a'; if($num >= 50) { echo '' . $num . '%'; @@ -108,7 +108,7 @@ echo '' . abs($num) . '%'; } - $chartData['labels'][] = $execution->name; + $chartData['labels'][] = $project->name; $chartData['data'][] = $deviation; ?>