Merge branch dev/bug-62539 of zentao/zentaopms (#10024)
This commit is contained in:
@@ -546,7 +546,7 @@ class productTao extends productModel
|
||||
return $this->dao->select('COUNT(1) AS count')->from(TABLE_BUG)->where('product')->eq("$productID")->andWhere('deleted')->eq('0')->fetch('count');
|
||||
case TABLE_DOC:
|
||||
/* Get docs count. */
|
||||
return $this->dao->select('COUNT(1) AS count')->from(TABLE_DOC)->where('product')->eq("$productID")->andWhere('deleted')->eq('0')->fetch('count');
|
||||
return $this->dao->select('COUNT(1) AS count')->from(TABLE_DOC)->where('product')->eq("$productID")->andWhere('deleted')->eq('0')->andWhere('type')->ne('chapter')->fetch('count');
|
||||
case TABLE_RELEASE:
|
||||
/* Get releases count. */
|
||||
return $this->dao->select('COUNT(1) AS count')->from(TABLE_RELEASE)->where('deleted')->eq('0')->andWhere('product')->eq("$productID")->fetch('count');
|
||||
|
||||
@@ -6,9 +6,11 @@
|
||||
title=productTao->getStatCountByID();
|
||||
cid=0
|
||||
|
||||
- 执行objectModel模块的getStatCountByID方法,参数是TABLE_PRODUCTPLAN, 1 @5
|
||||
- 执行objectModel模块的getStatCountByID方法,参数是TABLE_CASE, 1 @4
|
||||
- 执行objectModel模块的getStatCountByID方法,参数是TABLE_BUG, 1 @3
|
||||
- 获取产品1的计划数 @5
|
||||
- 获取产品1的用例数 @4
|
||||
- 获取产品1的bug数 @3
|
||||
- 获取产品1的文档数 @1
|
||||
- 获取产品1的发布数 @10
|
||||
|
||||
*/
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
@@ -17,9 +19,13 @@ include dirname(__FILE__, 2) . '/lib/product.unittest.class.php';
|
||||
zenData('productplan')->loadYaml('productplan')->gen(100);
|
||||
zenData('case')->loadYaml('case')->gen(100);
|
||||
zenData('bug')->loadYaml('bug')->gen(100);
|
||||
zenData('doc')->gen(100);
|
||||
zenData('build')->gen(100);
|
||||
|
||||
$product = new productTest('admin');
|
||||
|
||||
r($product->objectModel->getStatCountByID(TABLE_PRODUCTPLAN, 1)) && p('') && e('5');
|
||||
r($product->objectModel->getStatCountByID(TABLE_CASE, 1)) && p('') && e('4');
|
||||
r($product->objectModel->getStatCountByID(TABLE_BUG, 1)) && p('') && e('3');
|
||||
r($product->objectModel->getStatCountByID(TABLE_PRODUCTPLAN, 1)) && p('') && e('5'); //获取产品1的计划数
|
||||
r($product->objectModel->getStatCountByID(TABLE_CASE, 1)) && p('') && e('4'); //获取产品1的用例数
|
||||
r($product->objectModel->getStatCountByID(TABLE_BUG, 1)) && p('') && e('3'); //获取产品1的bug数
|
||||
r($product->objectModel->getStatCountByID(TABLE_DOC, 1)) && p('') && e('1'); //获取产品1的文档数
|
||||
r($product->objectModel->getStatCountByID(TABLE_BUILD, 1)) && p('') && e('10'); //获取产品1的发布数
|
||||
|
||||
Reference in New Issue
Block a user