Merge branch release/21.7.7 of zentao/zentaopms (#12402)
This commit is contained in:
@@ -66,14 +66,14 @@ class testsuiteModel extends model
|
||||
* 获取一个产品下的测试套件对。
|
||||
* Get test suites pairs of a product.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int|array $productID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getSuitePairs(int $productID): array
|
||||
public function getSuitePairs(int|array $productID): array
|
||||
{
|
||||
return $this->dao->select('id, name')->from(TABLE_TESTSUITE)
|
||||
->where('product')->eq($productID)
|
||||
->where('product')->in($productID)
|
||||
->beginIF($this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->andWhere('deleted')->eq('0')
|
||||
->andWhere("(`type` = 'public' OR (`type` = 'private' AND `addedBy` = '{$this->app->user->account}'))")
|
||||
|
||||
@@ -11,22 +11,19 @@ su('admin');
|
||||
/**
|
||||
|
||||
title=测试 testsuiteModel->getSuitePairs();
|
||||
timeout=0
|
||||
cid=19144
|
||||
pid=1
|
||||
|
||||
测试productID值为1,orderBy为id_desc >> 这是测试套件名称1
|
||||
测试productID值为1,orderBy为id_asc >> 这是测试套件名称3
|
||||
测试productID值为1,orderBy为name_desc,id_desc >> 这是测试套件名称1
|
||||
测试productID值为1,orderBy为name_asc,id_desc >> 这是测试套件名称3
|
||||
测试productID值为1,orderBy为id_desc >> 0
|
||||
测试productID值为1,orderBy为id_asc >> 0
|
||||
测试productID值为1,orderBy为name_desc,id_desc >> 0
|
||||
测试productID值为1,orderBy为name_asc,id_desc >> 0
|
||||
|
||||
切换用户dev1
|
||||
|
||||
测试productID值为1,orderBy为id_desc >> ~~
|
||||
测试productID值为1,orderBy为id_desc >> 这是测试套件名称1
|
||||
- 测试productID值为1,orderBy为id_desc属性1 @这是测试套件名称1
|
||||
- 测试productID值为1,orderBy为id_asc属性3 @这是测试套件名称3
|
||||
- 测试productID值为1,orderBy为name_desc,id_desc属性1 @这是测试套件名称1
|
||||
- 测试productID值为1,orderBy为name_asc,id_desc属性3 @这是测试套件名称3
|
||||
- 测试productID值为1,orderBy为id_desc @0
|
||||
- 测试productID值为1,orderBy为id_asc @0
|
||||
- 测试productID值为1,orderBy为name_desc,id_desc @0
|
||||
- 测试productID值为1,orderBy为name_asc,id_desc @0
|
||||
- 测试productID值为1,orderBy为id_desc属性2 @~~
|
||||
- 测试productID值为1,orderBy为id_desc属性1 @这是测试套件名称1
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -1243,8 +1243,15 @@ class testtask extends control
|
||||
*/
|
||||
public function ajaxGetDropMenu(int $productID, string $branch, int $taskID, string $module, string $method, string $objectType = '', int $objectID = 0)
|
||||
{
|
||||
$scope = empty($objectType) ? 'local' : 'all';
|
||||
$testtasks = $this->testtask->getProductTasks($productID, $branch, "$scope,totalStatus", '', '', 'id_desc', null);
|
||||
if($objectType && ($objectType == 'project' || $objectType == 'execution') && $objectID)
|
||||
{
|
||||
$testtasks = $objectType == 'project' ? $this->testtask->getProjectTasks($objectID, 0, 'id_desc', null) : $this->testtask->getExecutionTasks($objectID, 0, 'execution', 'id_desc', null);
|
||||
}
|
||||
else
|
||||
{
|
||||
$scope = empty($objectType) ? 'local' : 'all';
|
||||
$testtasks = $this->testtask->getProductTasks($productID, $branch, "$scope,totalStatus", '', '', 'id_desc', null);
|
||||
}
|
||||
|
||||
$namePairs = array();
|
||||
foreach($testtasks as $testtaskID => $testtask) $namePairs[$testtaskID] = $testtask->name;
|
||||
|
||||
Reference in New Issue
Block a user