* finish task#759 and 760

This commit is contained in:
areyou123456
2012-04-22 00:38:11 +00:00
parent f5ca4b0904
commit ac1aa7c303
4 changed files with 38 additions and 1 deletions
+1
View File
@@ -811,6 +811,7 @@ class bugModel extends model
*/
public function getByAssigntonull($productID, $projects, $orderBy, $pager)
{
return $this->dao->findByAssignedTo('')->from(TABLE_BUG)->andWhere('product')->eq($productID)
->andWhere('project')->in(array_keys($projects))
->andWhere('deleted')->eq(0)
+6
View File
@@ -27,6 +27,9 @@
<th><?php echo $lang->story->statusList['closed'] . $lang->story->common;?></th>
<th><?php echo $lang->product->plans;?></th>
<th><?php echo $lang->product->releases;?></th>
<th><?php echo $lang->product->bugs;?></th>
<th><?php echo $lang->bug->unResolved;?></th>
<th><?php echo $lang->bug->assignToNull;?></th>
</tr>
<?php foreach($productStats as $product):?>
<tr class='a-center' style='height:30px'>
@@ -37,6 +40,9 @@
<td><?php echo $product->stories['closed']?></td>
<td><?php echo $product->plans?></td>
<td><?php echo $product->releases?></td>
<td><?php echo $product->bugs?></td>
<td><?php echo $product->unResolved?></td>
<td><?php echo $product->assignToNull?></td>
</tr>
<?php endforeach;?>
</table>
+25 -1
View File
@@ -418,6 +418,7 @@ class productModel extends model
{
$this->loadModel('report');
$this->loadModel('story');
$this->loadModel('bug');
$products = $this->getList(',normal');
$stats = array();
@@ -460,7 +461,27 @@ class productModel extends model
->andWhere('product')->in(array_keys($products))
->groupBy('product')
->fetchPairs();
$bugs = $this->dao->select('product,count(*) AS conut')
->from(TABLE_BUG)
->where('deleted')->eq(0)
->andWhere('product')->in(array_keys($products))
->groupBy('product')
->fetchPairs();
$unResolved = $this->dao->select('product,count(*) AS count')
->from(TABLE_BUG)
->where('status')->eq('active')
->andwhere('deleted')->eq(0)
->andWhere('product')->in(array_keys($products))
->groupBy('product')
->fetchPairs();
$assignToNull = $this->dao->select('product,count(*) AS count')
->from(TABLE_BUG)
->where('AssignedTo')->eq('')
->andwhere('deleted')->eq(0)
->andWhere('product')->in(array_keys($products))
->groupBy('product')
->fetchPairs();
foreach($products as $key => $product)
{
if($this->checkPriv($product))
@@ -471,6 +492,9 @@ class productModel extends model
$product->plans = isset($plans[$product->id]) ? $plans[$product->id] : 0;
$product->releases= isset($releases[$product->id]) ? $releases[$product->id] : 0;
$product->bugs = isset($bugs[$product->id]) ? $bugs[$product->id] : 0;
$product->unResolved = isset($unResolved[$product->id]) ? $unResolved[$product->id] : 0;
$product->assignToNull = isset($assignToNull[$product->id]) ? $assignToNull[$product->id] : 0;
$stats[] = $product;
}
}
+6
View File
@@ -35,6 +35,9 @@
<th><?php echo $lang->story->statusList['closed'] . $lang->story->common;?></th>
<th><?php echo $lang->product->plans;?></th>
<th><?php echo $lang->product->releases;?></th>
<th><?php echo $lang->product->bugs;?></th>
<th><?php echo $lang->bug->unResolved;?></th>
<th><?php echo $lang->bug->assignToNull;?></th>
</tr>
<?php foreach($productStats as $product):?>
<tr class='a-center' style='height:30px'>
@@ -45,6 +48,9 @@
<td><?php echo $product->stories['closed']?></td>
<td><?php echo $product->plans?></td>
<td><?php echo $product->releases?></td>
<td><?php echo $product->bugs?></td>
<td><?php echo $product->unResolved;?></td>
<td><?php echo $product->assignToNull;?></td>
</tr>
<?php endforeach;?>
</table>