diff --git a/module/execution/control.php b/module/execution/control.php index d626d48c37..a8c683cb5a 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1333,11 +1333,6 @@ class execution extends control $executionID = $execution->id; $burnBy = $this->cookie->burnBy ? $this->cookie->burnBy : $burnBy; - /* Header and position. */ - $title = $execution->name . $this->lang->colon . $this->lang->execution->burn; - $position[] = html::a($this->createLink('execution', 'browse', "executionID=$executionID"), $execution->name); - $position[] = $this->lang->execution->burn; - /* Get date list. */ if(((strpos('closed,suspended', $execution->status) === false and helper::today() > $execution->end) or ($execution->status == 'closed' and substr($execution->closedDate, 0, 10) > $execution->end) @@ -1353,12 +1348,12 @@ class execution extends control $executionEnd = strpos($type, 'withdelay') !== false ? $execution->end : ''; $chartData = $this->execution->buildBurnData($executionID, $dateList, $burnBy, $executionEnd); - $dayList = array_fill(1, floor((int)$execution->days / $this->config->execution->maxBurnDay) + 5, ''); + $allDateList = date::getDateList($execution->begin, $endDate, 'Y-m-d', $type, $this->config->execution->weekend); + $dayList = array_fill(1, floor(count($allDateList) / $this->config->execution->maxBurnDay) + 5, ''); foreach($dayList as $key => $val) $dayList[$key] = $this->lang->execution->interval . ($key + 1) . $this->lang->day; /* Assign. */ - $this->view->title = $title; - $this->view->position = $position; + $this->view->title = $execution->name . $this->lang->colon . $this->lang->execution->burn; $this->view->tabID = 'burn'; $this->view->burnBy = $burnBy; $this->view->executionID = $executionID; @@ -1494,7 +1489,7 @@ class execution extends control if($_POST) { $this->execution->fixFirst($executionID); - return print(js::reload('parent.parent')); + return $this->send(array('result' => 'success', 'load' => true, 'closeModal' => true)); } $execution = $this->execution->getById($executionID); diff --git a/module/execution/css/burn.ui.css b/module/execution/css/burn.ui.css index 3f579cbb7f..d1c7a3a338 100644 --- a/module/execution/css/burn.ui.css +++ b/module/execution/css/burn.ui.css @@ -1,4 +1,7 @@ #mainContent h2 {font-size: 16px; font-weight: 600} #burnYUnit {position: absolute; color: #CBD0DB; top: 85px; left: 185px;} #burnXUnit {position: absolute; color: #CBD0DB; bottom: 70px; right: 165px;} -#featureBar .btn .icon {color: #fff !important} +#featureBar .btn .icon {color: #fff !important} +.burnByBox {width: 150px;} +.intervalBox {width: 100px;} +.text-gray {--tw-text-opacity: 1; color: rgba(var(--color-gray-500-rgb),var(--tw-text-opacity)) !important;} diff --git a/module/execution/js/burn.ui.js b/module/execution/js/burn.ui.js index c442d82960..175730be9c 100644 --- a/module/execution/js/burn.ui.js +++ b/module/execution/js/burn.ui.js @@ -8,3 +8,16 @@ window.randTipInfo = function(rowDatas) }); return tipHtml; } + +$(document).on('change', '#burnBy', function() +{ + $.cookie.set('burnBy', $(this).val(), {expires:config.cookieLife, path:config.webRoot}); + + let interval = typeof($('#interval').val()) == 'undefined' ? 0 : $('#interval').val() ; + loadPage($.createLink('execution', 'burn', 'executionID=' + executionID + '&type=' + type + '&interval=' + interval + '&burnBy=' + $(this).val())); +}); + +$(document).on('change', '#interval', function() +{ + loadPage($.createLink('execution', 'burn', 'executionID=' + executionID + '&type=' + type + '&interval=' + $(this).val())); +}); diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index 67fcaa1f32..b43454f404 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -353,7 +353,7 @@ $lang->execution->timeSummary = '
Aufgaben %s
Wartend %s   In Arbeit %s
Geplant %s
Genutzt %s   Rest %s
"; $lang->execution->wbs = "Aufgaben aufteilen"; $lang->execution->batchWBS = "Mehrere aufteilen"; -$lang->execution->howToUpdateBurn = "Hilfe "; +$lang->execution->howToUpdateBurn = "Hilfe "; $lang->execution->whyNoStories = "Keine Story kann verknüpft werden. Bitte prüfen Sie ob ein Story mit {$lang->executionCommon} verknüpft ist {$lang->productCommon} und stellen Sie sicher das diese geprüft ist."; $lang->execution->projectNoStories = "No story can be linked. Please check whether there is any story in {$lang->projectCommon} and make sure it has been reviewed."; $lang->execution->productStories = "{$lang->executionCommon} verknüpfte Story ist ein Subset von {$lang->productCommon}, welche nur nach überprüfung verknüpft werden kann. Bitte Story verknüpfen。"; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index e3a443aafe..a53170e62e 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -353,7 +353,7 @@ $lang->execution->timeSummary = '
Tasks %s :Waiting %s   Doing %s
Estimates %s :Cost %s   Left %s
"; $lang->execution->wbs = "Create Task"; $lang->execution->batchWBS = "Batch Create Tasks"; -$lang->execution->howToUpdateBurn = "Help "; +$lang->execution->howToUpdateBurn = "Help "; $lang->execution->whyNoStories = "No story can be linked. Please check whether there is any story in {$lang->executionCommon} which is linked to {$lang->productCommon} and make sure it has been reviewed."; $lang->execution->projectNoStories = "No story can be linked. Please check whether there is any story in {$lang->projectCommon} and make sure it has been reviewed."; $lang->execution->productStories = "Stories linked to {$lang->executionCommon} are the subeset of stories linked to {$lang->productCommon}. Stories can only be linked after they pass the review. Link Stories now."; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index c6634760ec..9a2db34102 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -353,7 +353,7 @@ $lang->execution->timeSummary = '
Tâches %s :A Faire %s   En Cours %s
Estimé %s :Coût %s   Reste %s
"; $lang->execution->wbs = "Créer Tâche"; $lang->execution->batchWBS = "Créer Tâche en lot"; -$lang->execution->howToUpdateBurn = "Mise à jour "; +$lang->execution->howToUpdateBurn = "Mise à jour "; $lang->execution->whyNoStories = "Aucune story ne peut être associée. Vérifiez s'il existe des stories dans {$lang->executionCommon} qui sont associées à {$lang->productCommon} et vérifiez qu'elles ont bien été validées."; $lang->execution->projectNoStories = "No story can be linked. Please check whether there is any story in {$lang->projectCommon} and make sure it has been reviewed."; $lang->execution->productStories = "Les stories associées au {$lang->executionCommon} sont une portion des stories associées au {$lang->productCommon}. Les stories ne peuvent être associées à un {$lang->executionCommon} qu'après avoir été validées. Associer Stories maintenant."; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 9be1c75eae..9e9632a3ad 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -353,7 +353,7 @@ $lang->execution->timeSummary = '
总任务 %s : 未开始 %s   进行中 %s
总预计 %s : 已消耗 %s   剩余 %s
"; $lang->execution->wbs = "分解任务"; $lang->execution->batchWBS = "批量分解"; -$lang->execution->howToUpdateBurn = "帮助 "; +$lang->execution->howToUpdateBurn = "帮助 "; $lang->execution->whyNoStories = "看起来没有{$lang->SRCommon}可以关联。请检查下{$lang->executionCommon}关联的{$lang->productCommon}中有没有{$lang->SRCommon},而且要确保它们已经审核通过。"; $lang->execution->projectNoStories = "看起来没有{$lang->SRCommon}可以关联。请检查下{$lang->projectCommon}中有没有{$lang->SRCommon},而且要确保它们已经审核通过。"; $lang->execution->productStories = "{$lang->executionCommon}关联的{$lang->SRCommon}是{$lang->productCommon}{$lang->SRCommon}的子集,并且只有评审通过的{$lang->SRCommon}才能关联。请关联{$lang->SRCommon}。"; diff --git a/module/execution/model.php b/module/execution/model.php index fd327e7ab6..92045f4e8f 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -600,7 +600,7 @@ class executionModel extends model ->setDefault('team', $this->post->name) ->join('whitelist', ',') ->stripTags($this->config->execution->editor->edit['id'], $this->config->allowedTags) - ->remove('products, branch, uid, plans, syncStories, contactListMenu, teamMembers, heightType') + ->remove('products, branch, uid, plans, syncStories, contactListMenu, teamMembers, heightType, delta') ->get(); if($this->post->heightType == 'custom' && !$this->loadModel('kanban')->checkDisplayCards($execution->displayCards)) return; diff --git a/module/execution/ui/burn.html.php b/module/execution/ui/burn.html.php index 71b0b33426..2dd21518b9 100644 --- a/module/execution/ui/burn.html.php +++ b/module/execution/ui/burn.html.php @@ -11,6 +11,9 @@ declare(strict_types=1); namespace zin; jsVar('workHour', $lang->execution->workHour); +jsVar('type', $type); +jsVar('executionID', $executionID); + $weekend = strpos($type, 'noweekend') !== false ? 'withweekend' : 'noweekend'; $delay = strpos($type, 'withdelay') !== false ? 'nodelay' : 'withdelay'; $weekendParam = $delay == 'withdelay' ? "nodelay,{$weekend}" : "withdelay,{$weekend}"; @@ -36,7 +39,7 @@ featureBar a ( set::id('weekend'), - set::href(createLink('execution', 'burn', "executionID={$execution->id}&type={$weekendParam}")), + set::href(createLink('execution', 'burn', "executionID={$execution->id}&type={$weekendParam}&interval={$interval}")), $lang->execution->{$weekend} ) ), @@ -68,9 +71,31 @@ featureBar ) : null, li ( - setClass('nav-item'), + setClass('nav-item mr-3'), html($lang->execution->howToUpdateBurn) ), + li + ( + set::class('burnByBox'), + select + ( + set::name('burnBy'), + set::items($lang->execution->burnByList), + set::value($burnBy), + set::required(true), + ) + ), + $interval ? li + ( + set::class('intervalBox ml-4'), + select + ( + set::name('interval'), + set::items($dayList), + set::value($interval), + set::required(true), + ) + ) : null ); panel @@ -79,7 +104,7 @@ panel ( setClass('text-center'), $executionName . ' ' . $this->lang->execution->burn . '(' . zget($lang->execution->burnByList, $burnBy) . ')', - isset($execution->delay) ? label(setClass('label danger-outline ml-3'), $lang->execution->delayed) : null, + isset($execution->delay) ? label(setClass('label danger-pale ring-danger ml-3'), $lang->execution->delayed) : null, ), echarts ( @@ -90,7 +115,8 @@ panel 'type' => 'category', 'data' => $chartData['labels'], 'name' => $lang->execution->burnXUnit, - 'boundaryGap' => false + 'boundaryGap' => false, + 'axisLabel' => array('interval' => (int)$interval) ) ), set::yAxis @@ -106,6 +132,11 @@ panel ( array ( + 'selectedMode' => false, + 'orient' => 'vertical', + 'left' => 'right', + 'top' => 'center', + 'align' => 'left', 'data' => array($lang->execution->charts->burn->graph->actuality, $lang->execution->charts->burn->graph->reference, $lang->execution->charts->burn->graph->delay), ) ), diff --git a/module/execution/ui/fixfirst.html.php b/module/execution/ui/fixfirst.html.php index ff957b91a6..506d115ae5 100644 --- a/module/execution/ui/fixfirst.html.php +++ b/module/execution/ui/fixfirst.html.php @@ -36,6 +36,7 @@ formPanel ( set::name('withLeft'), set::value(1), + set::checked(true), set::text($lang->execution->fixFirstWithLeft), set::rootClass('ml-4 w-1/3 items-center'), ),