* Fix bug in testcase::importFromLib.

This commit is contained in:
liumengyi
2023-11-02 09:11:43 +08:00
parent ae964f7858
commit 175b4eed67
2 changed files with 2 additions and 3 deletions
+2 -2
View File
@@ -18,8 +18,8 @@ window.updateTable = function(name, value, formData)
window.getModuleCellProps = function(cell)
{
const caseID = cell.row.data.id;
const branchID = this.getFormData(`branch[${cell.row.data.id}]`);
const modules = canImportModules[branchID][caseID];
const branchID = this.getFormData(`branch[${cell.row.data.id}]`) != undefined ? this.getFormData(`branch[${cell.row.data.id}]`) : cell.row.data.branch;
const modules = canImportModules[branchID] != undefined && canImportModules[branchID][caseID] != undefined ? canImportModules[branchID][caseID] : {};
return {items: modules};
}
-1
View File
@@ -168,7 +168,6 @@ class testcaseZen extends testcase
foreach($branches as $branchID => $branchName) $canImportModules[$branchID] = $this->testcase->getCanImportedModules($productID, $libID, $branchID, 'items');
if(empty($branches)) $canImportModules[0] = $this->testcase->getCanImportedModules($productID, $libID, 0, 'items');
/* Build the search form. */
$actionURL = $this->createLink('testcase', 'importFromLib', "productID={$productID}&branch={$branch}&libID={$libID}&orderBy={$orderBy}&browseType=bySearch&queryID=myQueryID");