Merge branch '12.x' of github.com:easysoft/zentaopms into 12.x

This commit is contained in:
z
2020-09-23 15:09:36 +08:00
8 changed files with 56 additions and 3 deletions
+5
View File
@@ -134,6 +134,11 @@ class bug extends control
/* Get bugs. */
$bugs = $this->bug->getBugs($productID, $projects, $branch, $browseType, $moduleID, $queryID, $sort, $pager);
if(empty($bugs) and $pageID > 1)
{
$pager = pager::init(0, $recPerPage, 1);
$bugs = $this->bug->getBugs($productID, $projects, $branch, $browseType, $moduleID, $queryID, $sort, $pager);
}
/* Process the sql, get the conditon partion, save it to session. */
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug', $browseType == 'needconfirm' ? false : true);
+6
View File
@@ -200,6 +200,12 @@ class caselib extends control
/* save session .*/
$cases = $this->caselib->getLibCases($libID, $browseType, $queryID, $moduleID, $sort, $pager);
if(empty($cases) and $pageID > 1)
{
$pager = pager::init(0, $recPerPage, 1);
$cases = $this->caselib->getLibCases($libID, $browseType, $queryID, $moduleID, $sort, $pager);
}
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', true);
$this->loadModel('datatable');
+5
View File
@@ -170,6 +170,11 @@ class product extends control
/* Get stories. */
$stories = $this->product->getStories($productID, $branch, $browseType, $queryID, $moduleID, $storyType, $sort, $pager);
if(empty($stories) and $pageID > 1)
{
$pager = pager::init(0, $recPerPage, 1);
$stories = $this->product->getStories($productID, $branch, $browseType, $queryID, $moduleID, $storyType, $sort, $pager);
}
/* Process the sql, get the conditon partion, save it to session. */
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story', $browseType != 'bysearch');
+12 -1
View File
@@ -181,8 +181,13 @@ class project extends control
/* Get tasks. */
$tasks = $this->project->getTasks($productID, $projectID, $this->projects, $browseType, $queryID, $moduleID, $sort, $pager);
if(empty($tasks) and $pageID > 1)
{
$pager = pager::init(0, $recPerPage, 1);
$tasks = $this->project->getTasks($productID, $projectID, $this->projects, $browseType, $queryID, $moduleID, $sort, $pager);
}
/* Build the search form. */
/* Build the search form. */
$actionURL = $this->createLink('project', 'task', "projectID=$projectID&status=bySearch&param=myQueryID");
$this->config->project->search['onMenuBar'] = 'yes';
$this->project->buildTaskSearchForm($projectID, $this->projects, $queryID, $actionURL);
@@ -701,6 +706,12 @@ class project extends control
$pager = new pager($recTotal, $recPerPage, $pageID);
$stories = $this->story->getProjectStories($projectID, $sort, $type, $param, 'story', '', $pager);
if(empty($stories) and $pageID > 1)
{
$pager = pager::init(0, $recPerPage, 1);
$stories = $this->story->getProjectStories($projectID, $sort, $type, $param, 'story', '', $pager);
}
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story', false);
$users = $this->user->getPairs('noletter');
+5
View File
@@ -97,6 +97,11 @@ class testcase extends control
/* Get test cases. */
$cases = $this->testcase->getTestCases($productID, $branch, $browseType, $browseType == 'bysearch' ? $queryID : $suiteID, $moduleID, $sort, $pager);
if(empty($cases) and $pageID > 1)
{
$pager = pager::init(0, $recPerPage, 1);
$cases = $this->testcase->getTestCases($productID, $branch, $browseType, $browseType == 'bysearch' ? $queryID : $suiteID, $moduleID, $sort, $pager);
}
/* save session .*/
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', $browseType != 'bysearch' ? false : true);
+6
View File
@@ -63,6 +63,12 @@ class testreport extends control
$pager = pager::init($recTotal, $recPerPage, $pageID);
$reports = $this->testreport->getList($objectID, $objectType, $extra, $orderBy, $pager);
if(empty($reports) and $pageID > 1)
{
$pager = pager::init(0, $recPerPage, 1);
$reports = $this->testreport->getList($objectID, $objectType, $extra, $orderBy, $pager);
}
if($objectType == 'project' and isset($_POST['taskIdList']))
{
$taskIdList = $_POST['taskIdList'];
+8 -1
View File
@@ -53,6 +53,13 @@ class testsuite extends control
$sort = $this->loadModel('common')->appendOrder($orderBy);
$productName = isset($this->products[$productID]) ? $this->products[$productID] : '';
$suites = $this->testsuite->getSuites($productID, $sort, $pager);
if(empty($suites) and $pageID > 1)
{
$pager = pager::init(0, $recPerPage, 1);
$suites = $this->testsuite->getSuites($productID, $sort, $pager);
}
$this->view->title = $productName . $this->lang->testsuite->common;
$this->view->position[] = html::a($this->createLink('testsuite', 'browse', "productID=$productID"), $productName);
$this->view->position[] = $this->lang->testsuite->common;
@@ -60,7 +67,7 @@ class testsuite extends control
$this->view->productID = $productID;
$this->view->productName = $productName;
$this->view->orderBy = $orderBy;
$this->view->suites = $this->testsuite->getSuites($productID, $sort, $pager);
$this->view->suites = $suites;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->pager = $pager;
+9 -1
View File
@@ -75,13 +75,21 @@ class testtask extends control
/* Append id for secend sort. */
$sort = $this->loadModel('common')->appendOrder($orderBy);
/* Get tasks. */
$tasks = $this->testtask->getProductTasks($productID, $branch, $sort, $pager, $scopeAndStatus, $beginTime, $endTime);
if(empty($tasks) and $pageID > 1)
{
$pager = pager::init(0, $recPerPage, 1);
$tasks = $this->testtask->getProductTasks($productID, $branch, $sort, $pager, $scopeAndStatus, $beginTime, $endTime);
}
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->common;
$this->view->position[] = html::a($this->createLink('testtask', 'browse', "productID=$productID"), $this->products[$productID]);
$this->view->position[] = $this->lang->testtask->common;
$this->view->productID = $productID;
$this->view->productName = $this->products[$productID];
$this->view->orderBy = $orderBy;
$this->view->tasks = $this->testtask->getProductTasks($productID, $branch, $sort, $pager, $scopeAndStatus, $beginTime, $endTime);
$this->view->tasks = $tasks;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->pager = $pager;
$this->view->branch = $branch;