* Fix check autocase for batch run case.

This commit is contained in:
tanghucheng
2022-12-16 09:26:09 +08:00
parent f71dfb3086
commit 1505cb89e4
4 changed files with 10 additions and 7 deletions
+3 -2
View File
@@ -17,6 +17,7 @@
<?php js::set('taskCaseBrowseType', ($browseType == 'bymodule' and $this->session->taskCaseBrowseType == 'bysearch') ? 'all' : $this->session->taskCaseBrowseType);?>
<?php js::set('browseType', $browseType);?>
<?php js::set('moduleID', $moduleID);?>
<?php js::set('automation', !empty($automation) ? $automation->id : 0);?>
<?php $this->app->loadLang('zanode');?>
<?php js::set('runCaseConfirm', $lang->zanode->runCaseConfirm);?>
<?php js::set('confirmURL', $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=id_desc&from=testcase&taskID=$taskID&confirm=yes"));?>
@@ -173,7 +174,7 @@ function runAutocase()
caseIDList.push($(this).val());
});
var url = createLink('zanode', 'ajaxRunZTFScript', 'scriptID=<?php echo $automation->id;?>');
var url = createLink('zanode', 'ajaxRunZTFScript', 'scriptID=' + automation)
var postData = {'caseIDList' : caseIDList.join(',')};
$.post(url, postData, function(result)
@@ -195,7 +196,7 @@ function confirmAction(obj)
if(dataAuto == 'auto') autoRun = dataAuto;
});
if(autoRun == 'no')
if(autoRun == 'no' || !automation)
{
setFormAction(cancelURL, '', '#caseList');
return false;