* Finish story 41069,41070.
This commit is contained in:
@@ -157,7 +157,7 @@ $config->product->report->planLabels[] = '';
|
||||
|
||||
$config->product->statisticFields = array();
|
||||
$config->product->statisticFields['requirements'] = array('draftRequirements', 'activeRequirements', 'changingRequirements', 'reviewingRequirements', 'closedRequirements');
|
||||
$config->product->statisticFields['stories'] = array('draftStories', 'activeStories', 'changingStories', 'reviewingStories', 'closedStories');
|
||||
$config->product->statisticFields['stories'] = array('draftStories', 'activeStories', 'changingStories', 'reviewingStories', 'closedStories', 'finishClosedStories', 'unclosedStories');
|
||||
$config->product->statisticFields['bugs'] = array('unResolvedBugs', 'closedBugs', 'fixedBugs');
|
||||
$config->product->statisticFields['plans'] = array('plans');
|
||||
$config->product->statisticFields['releases'] = array('releases');
|
||||
|
||||
@@ -1868,6 +1868,17 @@ class productModel extends model
|
||||
|
||||
if($storyType == 'requirement') $stories = $requirements;
|
||||
|
||||
$finishClosedStory = $this->dao->select('product, count(1) as finish')->from(TABLE_STORY)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('status')->eq('closed')
|
||||
->andWhere('closedReason')->eq('done')
|
||||
->fetchPairs('product', 'finish');
|
||||
|
||||
$unclosedStory = $this->dao->select('product, count(1) as unclosed')->from(TABLE_STORY)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('status')->ne('closed')
|
||||
->fetchPairs('product', 'unclosed');
|
||||
|
||||
$plans = $this->dao->select('product, count(*) AS count')
|
||||
->from(TABLE_PRODUCTPLAN)
|
||||
->where('deleted')->eq(0)
|
||||
@@ -1893,6 +1904,7 @@ class productModel extends model
|
||||
$unResolved = $this->dao->select('product,count(*) AS count')
|
||||
->from(TABLE_BUG)
|
||||
->where('status')->eq('active')
|
||||
->orWhere('resolution')->eq('postponed')
|
||||
->andWhere('product')->in($productKeys)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->groupBy('product')
|
||||
@@ -1951,7 +1963,10 @@ class productModel extends model
|
||||
$stats = array();
|
||||
foreach($products as $key => $product)
|
||||
{
|
||||
$product->stories = $stories[$product->id];
|
||||
$product->stories = $stories[$product->id];
|
||||
$product->stories['finishClosed'] = isset($finishClosedStory[$product->id]) ? $finishClosedStory[$product->id] : 0;
|
||||
$product->stories['unclosed'] = isset($unclosedStory[$product->id]) ? $unclosedStory[$product->id] : 0;
|
||||
|
||||
$product->requirements = $requirements[$product->id];
|
||||
$product->plans = isset($plans[$product->id]) ? $plans[$product->id] : 0;
|
||||
$product->releases = isset($releases[$product->id]) ? $releases[$product->id] : 0;
|
||||
|
||||
@@ -128,7 +128,8 @@
|
||||
<td><?php echo $program['activeStories'];?></td>
|
||||
<td><?php echo $program['changingStories'];?></td>
|
||||
<td><?php echo $program['reviewingStories'];?></td>
|
||||
<td><?php echo $program['totalStories'] == 0 ? 0 : round($program['closedStories'] / $program['totalStories'], 3) * 100;?>%</td>
|
||||
<?php $totalStories = $program['finishClosedStories'] + $program['unclosedStories'];?>
|
||||
<td><?php echo $totalStories == 0 ? 0 : round($program['finishClosedStories'] / $totalStories, 3) * 100;?>%</td>
|
||||
<td><?php echo $program['unResolvedBugs'];?></td>
|
||||
<td><?php echo ($program['unResolvedBugs'] + $program['fixedBugs']) == 0 ? 0 : round($program['fixedBugs'] / ($program['unResolvedBugs'] + $program['fixedBugs']), 3) * 100;?>%</td>
|
||||
<td><?php echo $program['plans'];?></td>
|
||||
@@ -168,7 +169,8 @@
|
||||
<td><?php echo isset($line['activeStories']) ? $line['activeStories'] : 0;?></td>
|
||||
<td><?php echo isset($line['changingStories']) ? $line['changingStories'] : 0;?></td>
|
||||
<td><?php echo isset($line['reviewingStories']) ? $line['reviewingStories'] : 0;?></td>
|
||||
<td><?php echo (isset($line['totalStories']) and $line['totalStories'] != 0) ? round($line['closedStories'] / $line['totalStories'], 3) * 100 : 0;?>%</td>
|
||||
<?php $totalStories = (isset($line['finishClosedStories']) ? $line['finishClosedStories'] : 0) + (isset($line['unclosedStories']) ? $line['unclosedStories'] : 0);?>
|
||||
<td><?php echo $totalStories == 0 ? 0 : round((isset($line['finishClosedStories']) ? $line['finishClosedStories'] : 0) / $totalStories, 3) * 100;?>%</td>
|
||||
<td><?php echo isset($line['unResolvedBugs']) ? $line['unResolvedBugs'] : 0;?></td>
|
||||
<td><?php echo (isset($line['fixedBugs']) and ($line['unResolvedBugs'] + $line['fixedBugs'] != 0)) ? round($line['fixedBugs'] / ($line['unResolvedBugs'] + $line['fixedBugs']), 3) * 100 : 0;?>%</td>
|
||||
<td><?php echo isset($line['plans']) ? $line['plans'] : 0;?></td>
|
||||
@@ -182,7 +184,7 @@
|
||||
<?php if(isset($line['products']) and is_array($line['products'])):?>
|
||||
<?php foreach($line['products'] as $productID => $product):?>
|
||||
<?php
|
||||
$totalStories = $product->stories['active'] + $product->stories['closed'] + $product->stories['draft'] + $product->stories['changing'] + $product->stories['reviewing'];
|
||||
$totalStories = $product->stories['finishClosed'] + $product->stories['unclosed'];
|
||||
|
||||
$trClass = '';
|
||||
if($product->line and $this->config->systemMode == 'ALM')
|
||||
@@ -231,7 +233,7 @@
|
||||
<td><?php echo $product->stories['active'];?></td>
|
||||
<td><?php echo $product->stories['changing'];?></td>
|
||||
<td><?php echo $product->stories['reviewing'];?></td>
|
||||
<td><?php echo $totalStories == 0 ? 0 : round($product->stories['closed'] / $totalStories, 3) * 100;?>%</td>
|
||||
<td><?php echo $totalStories == 0 ? 0 : round($product->stories['finishClosed'] / $totalStories, 3) * 100;?>%</td>
|
||||
<td><?php echo $product->unResolved;?></td>
|
||||
<td><?php echo ($product->unResolved + $product->fixedBugs) == 0 ? 0 : round($product->fixedBugs / ($product->unResolved + $product->fixedBugs), 3) * 100;?>%</td>
|
||||
<td><?php echo $product->plans;?></td>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
</thead>
|
||||
<tbody class="sortable" id="productTableList">
|
||||
<?php foreach($products as $product):?>
|
||||
<?php $totalStories = $product->stories['active'] + $product->stories['closed'] + $product->stories['draft'] + $product->stories['changing'] + $product->stories['reviewing'];?>
|
||||
<?php $totalStories = $product->stories['finishClosed'] + $product->stories['unclosed'];?>
|
||||
<tr class="text-center" data-id='<?php echo $product->id ?>' data-order='<?php echo $product->code;?>'>
|
||||
<td class='c-id text-left'>
|
||||
<?php if($canBatchEdit):?>
|
||||
@@ -95,7 +95,7 @@
|
||||
<td><?php echo $product->stories['active'];?></td>
|
||||
<td><?php echo $product->stories['changing'];?></td>
|
||||
<td><?php echo $product->stories['reviewing'];?></td>
|
||||
<td><?php echo $totalStories == 0 ? 0 : round($product->stories['closed'] / $totalStories, 3) * 100;?>%</td>
|
||||
<td><?php echo $totalStories == 0 ? 0 : round($product->stories['finishClosed'] / $totalStories, 3) * 100;?>%</td>
|
||||
<td><?php echo $product->unResolved;?></td>
|
||||
<td><?php echo ($product->unResolved + $product->fixedBugs) == 0 ? 0 : round($product->fixedBugs / ($product->unResolved + $product->fixedBugs), 3) * 100;?>%</td>
|
||||
<td><?php echo $product->plans;?></td>
|
||||
|
||||
Reference in New Issue
Block a user