* code for task #44305.

This commit is contained in:
王怡栋
2021-11-15 17:11:12 +08:00
parent 86622cc618
commit dff6726c6b
+11
View File
@@ -1486,6 +1486,16 @@ class productModel extends model
->groupBy('product')
->fetchPairs();
$this->app->loadClass('date', true);
$weekDate = date::getThisWeek();
$thisWeekBugs = $this->dao->select('product,count(*) AS count')
->from(TABLE_BUG)
->where('deleted')->eq(0)
->andWhere('openedDate')->between($weekDate['begin'], $weekDate['end'])
->andWhere('product')->in($productKeys)
->groupBy('product')
->fetchPairs();
$assignToNull = $this->dao->select('product,count(*) AS count')
->from(TABLE_BUG)
->where('deleted')->eq(0)
@@ -1517,6 +1527,7 @@ class productModel extends model
$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->thisWeekBugs = isset($thisWeekBugs[$product->id]) ? $thisWeekBugs[$product->id] : 0;
$product->assignToNull = isset($assignToNull[$product->id]) ? $assignToNull[$product->id] : 0;
$stats[] = $product;
}