Merge branch 'sprint/170' into 'sprint/170_mayue_branch'

# Conflicts:
#   module/build/view/create.html.php
#   module/project/model.php
This commit is contained in:
李玉春
2021-11-18 05:15:10 +00:00
51 changed files with 271 additions and 138 deletions
+19 -2
View File
@@ -174,7 +174,6 @@ class testcase extends control
$this->testcase->buildSearchForm($productID, $this->products, $queryID, $actionURL);
$showModule = !empty($this->config->datatable->testcaseBrowse->showModule) ? $this->config->datatable->testcaseBrowse->showModule : '';
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'case', $showModule) : array();
/* Get module tree.*/
if($projectID and empty($productID))
@@ -186,13 +185,20 @@ class testcase extends control
$moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'case', $startModuleID = 0, array('treeModel', 'createCaseLink'), '', $branch);
}
$product = $this->product->getById($productID);
if($product and $product->type != 'normal')
{
$this->app->loadLang('datatable');
$this->lang->datatable->showBranch = sprintf($this->lang->datatable->showBranch, $this->lang->product->branchName[$product->type]);
}
/* Assign. */
$tree = $moduleID ? $this->tree->getByID($moduleID) : '';
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testcase->common;
$this->view->position[] = html::a($this->createLink('testcase', 'browse', "productID=$productID&branch=$branch"), $this->products[$productID]);
$this->view->position[] = $this->lang->testcase->common;
$this->view->productID = $productID;
$this->view->product = $this->product->getById($productID);
$this->view->product = $product;
$this->view->productName = $this->products[$productID];
$this->view->modules = $this->tree->getOptionMenu($productID, $viewType = 'case', $startModuleID = 0, $branch);
$this->view->moduleTree = $moduleTree;
@@ -211,6 +217,7 @@ class testcase extends control
$this->view->suiteList = $this->loadModel('testsuite')->getSuites($productID);
$this->view->suiteID = $suiteID;
$this->view->setModule = true;
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'case', $showModule) : array();
$this->display();
}
@@ -536,6 +543,16 @@ class testcase extends control
if($product->type != 'normal') $customFields[$product->type] = $this->lang->product->branchName[$product->type];
$customFields[$field] = $this->lang->testcase->$field;
}
if($product->type != 'normal')
{
$this->config->testcase->custom->batchCreateFields = sprintf($this->config->testcase->custom->batchCreateFields, $product->type);
}
else
{
$this->config->testcase->custom->batchCreateFields = trim(sprintf($this->config->testcase->custom->batchCreateFields, ''), ',');
}
$showFields = $this->config->testcase->custom->batchCreateFields;
if($product->type == 'normal')
{