Merge branch 'sprint213_zg'
This commit is contained in:
@@ -1324,12 +1324,16 @@ class execution extends control
|
||||
list($begin, $end) = $this->execution->getBeginEnd4CFD($execution);
|
||||
$dateList = date::getDateList($begin, $end, 'Y-m-d', '');
|
||||
|
||||
list($cycleTimeAvg, $throughput) = $this->execution->getCFDStatistics($executionID, $dateList, $type);
|
||||
|
||||
$this->view->title = $this->lang->execution->CFD;
|
||||
$this->view->type = $type;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->executionName = $execution->name;
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->chartData = $this->execution->buildCFDData($executionID, $dateList, $type);
|
||||
$this->view->cycleTimeAvg = $cycleTimeAvg;
|
||||
$this->view->throughput = $throughput;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
.main-content > h2 {font-size: 16px;}
|
||||
|
||||
.pull-left .input-control {margin-right: 10px;}
|
||||
|
||||
@media screen and (max-width: 1920px)
|
||||
@@ -12,3 +13,9 @@
|
||||
{
|
||||
#cfdChart {width:1150px !important; height:400px !important};
|
||||
}
|
||||
|
||||
#mainContent {min-width: 1400px;}
|
||||
#burnStatistics {position: absolute; left: 1200px; width: 180px; height: 200px; top: 20%; margin-top: -30px; line-height: 30px; color: #838A9D; font-size: 12px; border: 1px solid #dcdcdc; background-color: #F8F8F8; padding: 15px 20px; color: #3c4353; border-radius: 8px;}
|
||||
#burnStatistics .bg-primary {margin-right: 5px;}
|
||||
#burnStatistics .icon-help {color: black;}
|
||||
#burnStatistics h3 {margin-top: 10px; text-indent: 10px; margin-bottom: 30px;}
|
||||
@@ -0,0 +1 @@
|
||||
#burnStatistics {width : 160px;}
|
||||
@@ -1,5 +1,7 @@
|
||||
$(function()
|
||||
{
|
||||
$('[data-toggle=tooltip]').tooltip();
|
||||
|
||||
if(chartData)
|
||||
{
|
||||
var i = 0;
|
||||
|
||||
@@ -412,6 +412,7 @@ $lang->execution->ge = "『%s』should be >= actual beg
|
||||
$lang->execution->storyDragError = "The {$lang->SRCommon} is still a draft or has been changed, please drag it after the review";
|
||||
$lang->execution->countTip = ' (%s member)';
|
||||
$lang->execution->pleaseInput = "Enter";
|
||||
$lang->execution->week = 'week';
|
||||
|
||||
/* Statistics. */
|
||||
$lang->execution->charts = new stdclass();
|
||||
@@ -429,6 +430,12 @@ $lang->execution->charts->burn->graph->reference = 'Referenz';
|
||||
$lang->execution->charts->burn->graph->actuality = 'Aktualität';
|
||||
$lang->execution->charts->burn->graph->delay = 'Delay';
|
||||
|
||||
$lang->execution->charts->cfd = new stdclass();
|
||||
$lang->execution->charts->cfd->cycleTime = 'Average cycle time';
|
||||
$lang->execution->charts->cfd->cycleTimeTip = 'Average cycle time of each card from development start to completion';
|
||||
$lang->execution->charts->cfd->throughput = 'Throughput Rate';
|
||||
$lang->execution->charts->cfd->throughputTip = 'Throughput Rate = WIP / Average cycle time';
|
||||
|
||||
$lang->execution->placeholder = new stdclass();
|
||||
$lang->execution->placeholder->code = 'Abkurzung des Projektnamens';
|
||||
$lang->execution->placeholder->totalLeft = 'Schätzungen zu Beginn des Projekts.';
|
||||
|
||||
@@ -412,6 +412,7 @@ $lang->execution->ge = "『%s』should be >= actual beg
|
||||
$lang->execution->storyDragError = "The {$lang->SRCommon} is still a draft or has been changed, please drag it after the review";
|
||||
$lang->execution->countTip = ' (%s member)';
|
||||
$lang->execution->pleaseInput = "Enter";
|
||||
$lang->execution->week = 'week';
|
||||
|
||||
/* Statistics. */
|
||||
$lang->execution->charts = new stdclass();
|
||||
@@ -429,6 +430,12 @@ $lang->execution->charts->burn->graph->reference = 'Ideal';
|
||||
$lang->execution->charts->burn->graph->actuality = 'Actual';
|
||||
$lang->execution->charts->burn->graph->delay = 'Delay';
|
||||
|
||||
$lang->execution->charts->cfd = new stdclass();
|
||||
$lang->execution->charts->cfd->cycleTime = 'Average cycle time';
|
||||
$lang->execution->charts->cfd->cycleTimeTip = 'Average cycle time of each card from development start to completion';
|
||||
$lang->execution->charts->cfd->throughput = 'Throughput Rate';
|
||||
$lang->execution->charts->cfd->throughputTip = 'Throughput Rate = WIP / Average cycle time';
|
||||
|
||||
$lang->execution->placeholder = new stdclass();
|
||||
$lang->execution->placeholder->code = "Abbreviation of {$lang->executionCommon} name";
|
||||
$lang->execution->placeholder->totalLeft = "Hours estimated on the first day of the {$lang->executionCommon}.";
|
||||
|
||||
@@ -415,6 +415,7 @@ $lang->execution->ge = "『%s』should be >= actual beg
|
||||
$lang->execution->storyDragError = "The {$lang->SRCommon} is still a draft or has been changed, please drag it after the review";
|
||||
$lang->execution->countTip = ' (%s member)';
|
||||
$lang->execution->pleaseInput = "Enter";
|
||||
$lang->execution->week = 'week';
|
||||
|
||||
/* Statistics. */
|
||||
$lang->execution->charts = new stdclass();
|
||||
@@ -432,6 +433,12 @@ $lang->execution->charts->burn->graph->reference = 'Idéal';
|
||||
$lang->execution->charts->burn->graph->actuality = 'Actuel';
|
||||
$lang->execution->charts->burn->graph->delay = 'Delay';
|
||||
|
||||
$lang->execution->charts->cfd = new stdclass();
|
||||
$lang->execution->charts->cfd->cycleTime = 'Average cycle time';
|
||||
$lang->execution->charts->cfd->cycleTimeTip = 'Average cycle time of each card from development start to completion';
|
||||
$lang->execution->charts->cfd->throughput = 'Throughput Rate';
|
||||
$lang->execution->charts->cfd->throughputTip = 'Throughput Rate = WIP / Average cycle time';
|
||||
|
||||
$lang->execution->placeholder = new stdclass();
|
||||
$lang->execution->placeholder->code = "Abréviation du nom du {$lang->executionCommon}";
|
||||
$lang->execution->placeholder->totalLeft = "Heures estimées le premier jour du {$lang->executionCommon}.";
|
||||
|
||||
@@ -412,6 +412,7 @@ $lang->execution->ge = "『%s』应当不小于实际
|
||||
$lang->execution->storyDragError = "该{$lang->SRCommon}还是草稿或已变更状态,请评审通过后再拖动";
|
||||
$lang->execution->countTip = '(%s人)';
|
||||
$lang->execution->pleaseInput = "请输入";
|
||||
$lang->execution->week = '周';
|
||||
|
||||
/* 统计。*/
|
||||
$lang->execution->charts = new stdclass();
|
||||
@@ -429,6 +430,12 @@ $lang->execution->charts->burn->graph->reference = '参考';
|
||||
$lang->execution->charts->burn->graph->actuality = '实际';
|
||||
$lang->execution->charts->burn->graph->delay = '延期';
|
||||
|
||||
$lang->execution->charts->cfd = new stdclass();
|
||||
$lang->execution->charts->cfd->cycleTime = '平均周期时间';
|
||||
$lang->execution->charts->cfd->cycleTimeTip = '平均每个卡片从开发启动到完成的周期时间';
|
||||
$lang->execution->charts->cfd->throughput = '吞吐率';
|
||||
$lang->execution->charts->cfd->throughputTip = '吞吐率 = 在制品 / 平均周期时间';
|
||||
|
||||
$lang->execution->placeholder = new stdclass();
|
||||
$lang->execution->placeholder->code = '团队内部的简称';
|
||||
$lang->execution->placeholder->totalLeft = "{$lang->executionCommon}开始时的总预计工时";
|
||||
|
||||
@@ -3094,8 +3094,8 @@ class executionModel extends model
|
||||
|
||||
/**
|
||||
* Get begin and end for CFD.
|
||||
*
|
||||
* @param object $execution
|
||||
*
|
||||
* @param object $execution
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -3236,7 +3236,7 @@ class executionModel extends model
|
||||
|
||||
/**
|
||||
* Build CFD data.
|
||||
*
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $type
|
||||
* @param array $dateList
|
||||
@@ -3294,6 +3294,44 @@ class executionModel extends model
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get CFD statistics.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param array $dateList
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getCFDStatistics($executionID, $dateList, $type)
|
||||
{
|
||||
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $type);
|
||||
$kanbanData = array_shift($kanbanData);
|
||||
|
||||
$cycleTime = array();
|
||||
foreach($kanbanData->groups as $group)
|
||||
{
|
||||
foreach($group->lanes as $lane)
|
||||
{
|
||||
if(!isset($lane->items['closed'])) continue;
|
||||
|
||||
foreach($lane->items['closed'] as $item)
|
||||
{
|
||||
$diffTime = $type == 'story' ? strtotime($item['lastEditedDate']) - strtotime($item['openedDate']) : strtotime($item['closedDate']) - strtotime($item['openedDate']);
|
||||
$day = floor($diffTime / (3600 * 24));
|
||||
if($day > 0) $cycleTime[$item['id']] = $day;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$itemCount = count($cycleTime);
|
||||
if(!$itemCount) return array('', '');
|
||||
$cycleTimeAvg = round(array_sum($cycleTime) / $itemCount);
|
||||
$throughput = round(($itemCount * 7) / $cycleTimeAvg, 1) . "{$this->lang->execution->kanbanCardsUnit}/" . $this->lang->execution->week;
|
||||
|
||||
return array($cycleTimeAvg, $throughput);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get taskes by search.
|
||||
*
|
||||
|
||||
@@ -35,6 +35,12 @@
|
||||
<div id="cfdChart" style="width: 1200px; height: 600px"></div>
|
||||
<div id="cfdYUnit"><?php echo $lang->execution->count;?></div>
|
||||
<div id="cfdXUnit"><?php echo $lang->execution->burnXUnit;?></div>
|
||||
<div id="burnStatistics">
|
||||
<div class="stat-title"><span class="bg-primary"> </span> <?php echo $lang->execution->charts->cfd->cycleTime;?> <i class="icon icon-help" data-toggle="tooltip" data-tip-class="tooltip-help" data-placement="bottom" title="<?php echo $lang->execution->charts->cfd->cycleTimeTip;?>"></i></div>
|
||||
<h3><?php echo $cycleTimeAvg ? ($cycleTimeAvg . $lang->day) : $lang->noData;?></h3>
|
||||
<div class="stat-title"><span class="bg-primary"> </span> <?php echo $lang->execution->charts->cfd->throughput;?> <i class="icon icon-help" data-toggle="tooltip" data-tip-class="tooltip-help" data-placement="bottom" title="<?php echo $lang->execution->charts->cfd->throughputTip;?>"></i></div>
|
||||
<h3><?php echo $throughput ? $throughput : $lang->noData;?></h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -461,6 +461,7 @@
|
||||
|
||||
if(!notTriggerEvent) app.$app.trigger('reloadapp', app);
|
||||
|
||||
if(url) $(iframe.contentWindow.document.body).hide(); // Code for task #59703.
|
||||
app.$app.addClass('loading');
|
||||
if(app._loadTimer) clearTimeout(app._loadTimer);
|
||||
app._loadTimer = setTimeout(function()
|
||||
|
||||
+13
-10
@@ -1302,16 +1302,19 @@ class kanbanModel extends model
|
||||
|
||||
if(empty($object)) continue;
|
||||
|
||||
$cardData['id'] = $object->id;
|
||||
$cardData['order'] = $cardOrder++;
|
||||
$cardData['pri'] = $object->pri ? $object->pri : '';
|
||||
$cardData['estimate'] = $cell->type == 'bug' ? '' : $object->estimate;
|
||||
$cardData['assignedTo'] = $object->assignedTo;
|
||||
$cardData['deadline'] = $cell->type == 'story' ? '' : $object->deadline;
|
||||
$cardData['severity'] = $cell->type == 'bug' ? $object->severity : '';
|
||||
$cardData['acl'] = 'open';
|
||||
$cardData['lane'] = $laneID;
|
||||
$cardData['column'] = $cell->column;
|
||||
$cardData['id'] = $object->id;
|
||||
$cardData['order'] = $cardOrder++;
|
||||
$cardData['pri'] = $object->pri ? $object->pri : '';
|
||||
$cardData['estimate'] = $cell->type == 'bug' ? '' : $object->estimate;
|
||||
$cardData['assignedTo'] = $object->assignedTo;
|
||||
$cardData['deadline'] = $cell->type == 'story' ? '' : $object->deadline;
|
||||
$cardData['severity'] = $cell->type == 'bug' ? $object->severity : '';
|
||||
$cardData['acl'] = 'open';
|
||||
$cardData['lane'] = $laneID;
|
||||
$cardData['column'] = $cell->column;
|
||||
$cardData['openedDate'] = $object->openedDate;
|
||||
$cardData['closedDate'] = $object->closedDate;
|
||||
$cardData['lastEditedDate'] = $object->lastEditedDate;
|
||||
|
||||
if($cell->type == 'task')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user