From 95d5f803cfd4fc2e7dad35b9eb2bbf7d1e2d1d7e Mon Sep 17 00:00:00 2001 From: liumengyi Date: Wed, 3 Jan 2024 10:16:47 +0800 Subject: [PATCH] * Fix bug #42467. --- module/block/ui/executionstatisticblock.html.php | 8 +++++++- module/block/zen.php | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/module/block/ui/executionstatisticblock.html.php b/module/block/ui/executionstatisticblock.html.php index a599e1aab0..e2769cab1c 100644 --- a/module/block/ui/executionstatisticblock.html.php +++ b/module/block/ui/executionstatisticblock.html.php @@ -12,7 +12,13 @@ declare(strict_types=1); namespace zin; $active = isset($params['active']) ? $params['active'] : key($executions); -$execution = null; +$execution = new stdclass(); +$execution->progress = ''; +$execution->doneStory = ''; +$execution->totalStory = ''; +$execution->totalTask = ''; +$execution->undoneTask = ''; +$execution->yesterdayDoneTask = ''; $items = array(); foreach($executions as $executionItem) diff --git a/module/block/zen.php b/module/block/zen.php index 6eb1c23752..1e7baa1c57 100644 --- a/module/block/zen.php +++ b/module/block/zen.php @@ -1046,10 +1046,10 @@ class blockZen extends block $executions = $this->loadModel('execution')->getOrderedExecutions($projectID, $status, $count, 'skipparent'); if(empty($executions)) { - $this->view->chartData = array(); + $this->view->chartData = array('labels' => array(), 'baseLine' => array(), 'burnLine' => array()); $this->view->executions = array(); - $this->view->projects = array(); - $this->view->currentProjectID = 9; + $this->view->projects = $this->loadModel('project')->getPairs(); + $this->view->currentProjectID = $projectID; return; }