From 0a83b068a09e1577a4882242ad2e70e30bc9a195 Mon Sep 17 00:00:00 2001 From: mayue Date: Wed, 10 Aug 2022 15:26:44 +0800 Subject: [PATCH] * Fix bug #26252. --- module/programplan/control.php | 5 +++++ module/programplan/view/gantt.html.php | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/module/programplan/control.php b/module/programplan/control.php index 9180048d29..fa727343c4 100644 --- a/module/programplan/control.php +++ b/module/programplan/control.php @@ -101,6 +101,11 @@ class programplan extends control if(strpos($selectCustom, 'date') !== false) $dateDetails = 0; $plans = $this->programplan->getDataForGanttGroupByAssignedTo($projectID, $this->productID, $baselineID, $selectCustom, false); + + /* Set Custom. */ + foreach(explode(',', $this->config->programplan->custom->customGanttFields) as $field) $customFields[$field] = $this->lang->programplan->ganttCustom[$field]; + $this->view->customFields = $customFields; + $this->view->showFields = $this->config->programplan->ganttCustom->ganttFields; } if($type == 'lists') diff --git a/module/programplan/view/gantt.html.php b/module/programplan/view/gantt.html.php index 9b9cf6984d..8e9a812d44 100644 --- a/module/programplan/view/gantt.html.php +++ b/module/programplan/view/gantt.html.php @@ -513,10 +513,14 @@ $(function() if(showFields.indexOf('estimate') != -1) gantt.config.columns.push({name: 'estimate', align: 'center', resize: true, width: 60}); if(showFields.indexOf('progress') != -1) gantt.config.columns.push({name: 'percent', align: 'center', resize: true, width:70, template: function(plan){ if(plan.percent) return Math.round(plan.percent) + '%';}}); if(showFields.indexOf('taskProgress') != -1) gantt.config.columns.push({name: 'taskProgress', align: 'center', resize: true, width: 60}); - if(showFields.indexOf('realBegan') != -1) gantt.config.columns.push({name: 'realBegan', align: 'center', resize: true, width: 60}); - if(showFields.indexOf('realEnd') != -1) gantt.config.columns.push({name: 'realEnd', align: 'center', resize: true, width: 60}); + if(showFields.indexOf('realBegan') != -1) gantt.config.columns.push({name: 'realBegan', align: 'center', resize: true, width: 80}); + if(showFields.indexOf('realEnd') != -1) gantt.config.columns.push({name: 'realEnd', align: 'center', resize: true, width: 80}); if(showFields.indexOf('consumed') != -1) gantt.config.columns.push({name: 'consumed', align: 'center', resize: false, width: 60}); + endField = gantt.config.columns.pop(); + endField.resize = false; + gantt.config.columns.push(endField); + gantt.locale.labels.column_text = ; gantt.locale.labels.column_owner_id = "programplan->PMAB;?>"; gantt.locale.labels.column_status = "statusAB;?>";