* Resolve issue#629.

This commit is contained in:
xieqiyu
2022-05-13 03:02:26 +08:00
parent fa4ea0ff4d
commit 89491d97de
2 changed files with 27 additions and 2 deletions
+13 -2
View File
@@ -2011,8 +2011,18 @@ class execution extends control
$this->execution->setMenu($execution->id);
$this->app->loadLang('bug');
list($dateList, $interval) = $this->execution->getDateList($execution->begin, $execution->end, 'noweekend', 0, 'Y-m-d');
$chartData = $this->execution->buildBurnData($executionID, $dateList, 'noweekend');
$type = 'noweekend';
if(((strpos('closed,suspended', $execution->status) === false and helper::today() > $execution->end)
or ($execution->status == 'closed' and substr($execution->closedDate, 0, 10) > $execution->end)
or ($execution->status == 'suspended' and $execution->suspendedDate > $execution->end))
and strpos($type, 'delay') === false)
$type .= ',withdelay';
$deadline = $execution->status == 'closed' ? substr($execution->closedDate, 0, 10) : $execution->suspendedDate;
$deadline = strpos('closed,suspended', $execution->status) === false ? helper::today() : $deadline;
$endDate = strpos($type, 'withdelay') !== false ? $deadline : $execution->end;
list($dateList, $interval) = $this->execution->getDateList($execution->begin, $endDate, $type, 0, 'Y-m-d');
$chartData = $this->execution->buildBurnData($executionID, $dateList, $type);
/* Load pager. */
$this->app->loadClass('pager', $static = true);
@@ -2036,6 +2046,7 @@ class execution extends control
$this->view->statData = $this->execution->statRelatedData($executionID);
$this->view->chartData = $chartData;
$this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable.
$this->view->type = $type;
$this->display();
}
+14
View File
@@ -12,6 +12,7 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::set('type', $type);?>
<?php $style = isonlybody() ? 'style="padding-top: 0px;"' : '';?>
<div id='mainContent' class="main-row" <?php echo $style;?>>
<div class="col-8 main-col">
@@ -321,6 +322,19 @@ $(function()
}]
};
var delaySets =
{
label: "<?php echo $lang->execution->charts->burn->graph->delay;?>",
color: 'red',
pointStrokeColor: 'red',
pointHighlightStroke: 'red',
pointColor: 'red',
fillColor: 'rgba(0,106,241, .07)',
pointHighlightFill: '#fff',
data: <?php echo isset($chartData['delayLine']) ? $chartData['delayLine'] : '[]';?>
}
if(type.match('withdelay')) data.datasets.push(delaySets);
var burnChart = $("#burnCanvas").lineChart(data,
{
pointDotStrokeWidth: 2,