From a2f203990e39d0ffa2f96a4eb4db433c44f8c491 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 26 Jul 2022 17:05:13 +0800 Subject: [PATCH 1/2] * Fixed burnout chart display in execution list. --- module/execution/model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index eb5d3dc9aa..c290c90947 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -3248,8 +3248,8 @@ class executionModel extends model } $current = $begin; + $today = helper::today(); $endTime = strtotime($end); - $preValue = 0; $todayTag = 0; foreach($sets as $date => $set) @@ -3261,7 +3261,6 @@ class executionModel extends model { $currentTime = strtotime($current); if($currentTime > $endTime) break; - if(isset($sets[$current])) $preValue = $sets[$current]->value; if($currentTime > time() and !$todayTag) { $todayTag = $i + 1; @@ -3271,8 +3270,9 @@ class executionModel extends model { $sets[$current] = new stdclass(); $sets[$current]->name = $current; - $sets[$current]->value = $preValue; + $sets[$current]->value = helper::diffDate($current, $today) <= 0 ? 0 : 'null'; } + $nextDay = date(DT_DATE1, $currentTime + 24 * 3600); $current = $nextDay; } From a84a4098e9b0a67fee2220a8500bf5bcd4253301 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 26 Jul 2022 17:18:35 +0800 Subject: [PATCH 2/2] * Fix bug #25721. --- module/execution/model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/execution/model.php b/module/execution/model.php index c290c90947..715bc2d342 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -3250,6 +3250,7 @@ class executionModel extends model $current = $begin; $today = helper::today(); $endTime = strtotime($end); + $preValue = 0; $todayTag = 0; foreach($sets as $date => $set) @@ -3266,11 +3267,12 @@ class executionModel extends model $todayTag = $i + 1; } + if(isset($sets[$current])) $preValue = $sets[$current]->value; if(!isset($sets[$current]) and $mode == 'noempty') { $sets[$current] = new stdclass(); $sets[$current]->name = $current; - $sets[$current]->value = helper::diffDate($current, $today) <= 0 ? 0 : 'null'; + $sets[$current]->value = helper::diffDate($current, $today) < 0 ? $preValue : 'null'; } $nextDay = date(DT_DATE1, $currentTime + 24 * 3600);