From eebabad646b07bf47fdd7677fdcf57c82056b3cc Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Fri, 26 Nov 2021 17:34:19 +0800 Subject: [PATCH] * Fix task 45028. --- module/testcase/control.php | 4 ++-- module/testcase/view/caseheader.html.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index 3c8a3fc327..cd117ca4bb 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1712,7 +1712,7 @@ class testcase extends control * @access public * @return void */ - public function importFromLib($productID, $branch = 0, $libID = 0, $orderBy = 'id_desc', $browseType = '', $queryID = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function importFromLib($productID, $branch = 0, $libID = 0, $orderBy = 'id_desc', $browseType = '', $queryID = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1, $projectID = 0) { $browseType = strtolower($browseType); $queryID = (int)$queryID; @@ -1763,7 +1763,7 @@ class testcase extends control $this->view->libModules = $this->tree->getOptionMenu($libID, 'caselib'); $this->view->pager = $pager; $this->view->orderBy = $orderBy; - $this->view->branches = $this->loadModel('branch')->getPairs($productID); + $this->view->branches = array('0' => $this->lang->branch->main) + $this->loadModel('branch')->getPairs($productID, '', $projectID); $this->view->browseType = $browseType; $this->view->queryID = $queryID; diff --git a/module/testcase/view/caseheader.html.php b/module/testcase/view/caseheader.html.php index 9853fe669d..a35a43d4e7 100644 --- a/module/testcase/view/caseheader.html.php +++ b/module/testcase/view/caseheader.html.php @@ -143,7 +143,7 @@ $class = common::hasPriv('testcase', 'importFromLib') ? '' : "class=disabled"; $misc = common::hasPriv('testcase', 'importFromLib') ? "data-app='{$this->app->tab}'" : "class=disabled"; - $link = common::hasPriv('testcase', 'importFromLib') ? $this->createLink('testcase', 'importFromLib', "productID=$productID&branch=$branch") : '#'; + $link = common::hasPriv('testcase', 'importFromLib') ? $this->createLink('testcase', 'importFromLib', "productID=$productID&branch=$branch&libID=0&orderBy=id_desc&browseType=&queryID=10&recTotal=0&recPerPage=20&pageID=1&projectID=$projectID") : '#'; echo "
  • " . html::a($link, $lang->testcase->importFromLib, '', $misc . "data-app={$this->app->tab}") . "
  • "; ?>