diff --git a/module/bug/model.php b/module/bug/model.php index a0624d30fd..f66c5cfc26 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -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) diff --git a/module/my/view/blockproducts.html.php b/module/my/view/blockproducts.html.php index 257b949904..031aaa315a 100644 --- a/module/my/view/blockproducts.html.php +++ b/module/my/view/blockproducts.html.php @@ -27,6 +27,9 @@ story->statusList['closed'] . $lang->story->common;?> product->plans;?> product->releases;?> + product->bugs;?> + bug->unResolved;?> + bug->assignToNull;?> @@ -37,6 +40,9 @@ stories['closed']?> plans?> releases?> + bugs?> + unResolved?> + assignToNull?> diff --git a/module/product/model.php b/module/product/model.php index f4e8f87501..40d0428d46 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -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; } } diff --git a/module/product/view/index.html.php b/module/product/view/index.html.php index e6ef493437..3dd72d3786 100644 --- a/module/product/view/index.html.php +++ b/module/product/view/index.html.php @@ -35,6 +35,9 @@ story->statusList['closed'] . $lang->story->common;?> product->plans;?> product->releases;?> + product->bugs;?> + bug->unResolved;?> + bug->assignToNull;?> @@ -45,6 +48,9 @@ stories['closed']?> plans?> releases?> + bugs?> + unResolved;?> + assignToNull;?>