* Finish task #40517.
This commit is contained in:
@@ -1463,6 +1463,15 @@ class productModel extends model
|
||||
->groupBy('product')
|
||||
->fetchPairs();
|
||||
|
||||
$fixedBugs = $this->dao->select('product,count(*) AS count')
|
||||
->from(TABLE_BUG)
|
||||
->where('deleted')->eq(0)
|
||||
->andwhere('status')->eq('closed')
|
||||
->andWhere('product')->in($productKeys)
|
||||
->andWhere('resolution')->eq('fixed')
|
||||
->groupBy('product')
|
||||
->fetchPairs();
|
||||
|
||||
$closedBugs = $this->dao->select('product,count(*) AS count')
|
||||
->from(TABLE_BUG)
|
||||
->where('deleted')->eq(0)
|
||||
@@ -1502,6 +1511,7 @@ class productModel extends model
|
||||
$product->bugs = isset($bugs[$product->id]) ? $bugs[$product->id] : 0;
|
||||
$product->unResolved = isset($unResolved[$product->id]) ? $unResolved[$product->id] : 0;
|
||||
$product->closedBugs = isset($closedBugs[$product->id]) ? $closedBugs[$product->id] : 0;
|
||||
$product->fixedBugs = isset($fixedBugs[$product->id]) ? $fixedBugs[$product->id] : 0;
|
||||
$product->assignToNull = isset($assignToNull[$product->id]) ? $assignToNull[$product->id] : 0;
|
||||
$stats[] = $product;
|
||||
}
|
||||
|
||||
@@ -48,24 +48,25 @@
|
||||
<th class="w-300px" colspan="4"><?php echo $lang->story->requirement;?></th>
|
||||
<?php endif;?>
|
||||
<th class="w-300px" colspan="4"><?php echo $lang->story->story;?></th>
|
||||
<th class="w-150px" colspan="2"><?php echo $lang->bug->common;?></th>
|
||||
<th class="w-80px" rowspan="2"><?php echo $lang->product->release;?></th>
|
||||
<th class="w-200px" colspan="3"><?php echo $lang->bug->common;?></th>
|
||||
<th class="w-80px" rowspan="2"><?php echo $lang->product->plan;?></th>
|
||||
<th class="w-80px" rowspan="2"><?php echo $lang->product->release;?></th>
|
||||
<th class='c-actions w-70px' rowspan="2"><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
<tr class="text-center">
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<th style="border-left: 1px solid #ddd;"><?php echo $lang->story->activate;?></th>
|
||||
<th><?php echo $lang->story->close;?></th>
|
||||
<th><?php echo $lang->story->draft;?></th>
|
||||
<th style="border-left: 1px solid #ddd;"><?php echo $lang->story->draft;?></th>
|
||||
<th><?php echo $lang->story->activate;?></th>
|
||||
<th><?php echo $lang->story->change;?></th>
|
||||
<th><?php echo $lang->story->completeRate;?></th>
|
||||
<?php endif;?>
|
||||
<th style="border-left: 1px solid #ddd;"><?php echo $lang->story->activate;?></th>
|
||||
<th><?php echo $lang->story->close;?></th>
|
||||
<th><?php echo $lang->story->draft;?></th>
|
||||
<th style="border-left: 1px solid #ddd;"><?php echo $lang->story->draft;?></th>
|
||||
<th><?php echo $lang->story->activate;?></th>
|
||||
<th><?php echo $lang->story->change;?></th>
|
||||
<th><?php echo $lang->story->completeRate;?></th>
|
||||
<th style="border-left: 1px solid #ddd;"><?php echo $lang->bug->activate;?></th>
|
||||
<th><?php echo $lang->close;?></th>
|
||||
<th><?php echo $lang->bug->repairRate;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="productTableList">
|
||||
@@ -78,7 +79,7 @@
|
||||
?>
|
||||
<?php if(isset($program['programName']) and $config->systemMode == 'new'):?>
|
||||
<tr <?php echo $trAttrs;?>>
|
||||
<td colspan="<?php echo $this->config->URAndSR ? 14 : 10;?>">
|
||||
<td colspan="<?php echo $this->config->URAndSR ? 15 : 11;?>">
|
||||
<span class="table-nest-icon icon table-nest-toggle"></span>
|
||||
<?php echo $program['programName']?>
|
||||
</td>
|
||||
@@ -104,7 +105,7 @@
|
||||
}
|
||||
?>
|
||||
<tr <?php echo $trAttrs;?>>
|
||||
<td colspan="<?php echo $this->config->URAndSR ? 14 : 10;?>">
|
||||
<td colspan="<?php echo $this->config->URAndSR ? 15 : 11;?>">
|
||||
<span class="table-nest-icon icon table-nest-toggle"></span>
|
||||
<?php echo $line['lineName']?>
|
||||
</td>
|
||||
@@ -149,19 +150,20 @@
|
||||
?>
|
||||
</td>
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<td><?php echo $product->requirements['active'];?></td>
|
||||
<td><?php echo $product->requirements['closed'];?></td>
|
||||
<td><?php echo $product->requirements['draft'];?></td>
|
||||
<td><?php echo $product->requirements['active'];?></td>
|
||||
<td><?php echo $product->requirements['changed'];?></td>
|
||||
<td><?php echo $totalRequirements == 0 ? 0 : round($product->requirements['closed'] / $totalRequirements, 3) * 100;?>%</td>
|
||||
<?php endif;?>
|
||||
<td><?php echo $product->stories['active'];?></td>
|
||||
<td><?php echo $product->stories['closed'];?></td>
|
||||
<td><?php echo $product->stories['draft'];?></td>
|
||||
<td><?php echo $product->stories['active'];?></td>
|
||||
<td><?php echo $product->stories['changed'];?></td>
|
||||
<td><?php echo $totalStories == 0 ? 0 : round($product->stories['closed'] / $totalStories, 3) * 100;?>%</td>
|
||||
<td><?php echo $product->unResolved;?></td>
|
||||
<td><?php echo $product->closedBugs;?></td>
|
||||
<td><?php echo $product->releases;?></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>
|
||||
<td><?php echo $product->releases;?></td>
|
||||
<td class='c-actions sort-handler'>
|
||||
<?php common::printIcon('product', 'edit', "product=$product->id", $product, 'list', 'edit');?>
|
||||
<?php if($canOrder):?>
|
||||
|
||||
Reference in New Issue
Block a user