* [task#136554,doing,0,5h] Do not limit project if it is from document.

This commit is contained in:
daitingting
2025-01-14 17:19:32 +08:00
committed by 周鑫
parent ab56c982dc
commit 9095c54d37
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -180,7 +180,7 @@ class caselib extends control
/* Save query session .*/
$sort = common::appendOrder($orderBy);
$cases = $this->caselib->getLibCases($libID, $browseType, (int)$queryID, $moduleID, $sort, $pager);
$cases = $this->caselib->getLibCases($libID, $browseType, (int)$queryID, $moduleID, $sort, $pager, $from);
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', true);
$this->loadModel('testcase');
+3 -2
View File
@@ -223,10 +223,11 @@ class caselibModel extends model
* @param int $moduleID
* @param string $sort
* @param object $pager
* @param string $from
* @access public
* @return array
*/
public function getLibCases(int $libID, string $browseType, int $queryID = 0, int $moduleID = 0, string $sort = 'id_desc', object $pager = null): array
public function getLibCases(int $libID, string $browseType, int $queryID = 0, int $moduleID = 0, string $sort = 'id_desc', object $pager = null, string $from = 'qa'): array
{
$browseType = $browseType == 'bymodule' && $this->session->libBrowseType && $this->session->libBrowseType != 'bysearch' ? $this->session->libBrowseType : $browseType;
@@ -266,7 +267,7 @@ class caselibModel extends model
->andWhere('deleted')->eq('0')
->andWhere($caseQuery)
->beginIF($queryLibID != 'all')->andWhere('lib')->eq($libID)->fi()
->beginIF($this->app->tab != 'qa')->andWhere('project')->eq($this->session->project)->fi();
->beginIF($this->app->tab != 'qa' && $from != 'doc')->andWhere('project')->eq($this->session->project)->fi();
}
else
{