* finish task#759 and 760
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user