* Fix export error for task #69596,69595.

This commit is contained in:
tanghucheng
2022-09-23 10:48:06 +08:00
parent ffc73c5d97
commit fdb61161d3
3 changed files with 9 additions and 2 deletions
+3 -1
View File
@@ -2325,6 +2325,8 @@ class bug extends control
$this->port->export('bug');
$this->fetch('file', 'export2' . $_POST['fileType'], $_POST);
}
$product = $this->loadModel('product')->getByID($productID);
if($product->type == 'normal') $this->config->bug->exportFields = str_replace('branch,', '', $this->config->bug->exportFields);
$fileName = $this->lang->bug->common;
if($executionID)
@@ -2334,7 +2336,7 @@ class bug extends control
}
else
{
$productName = $this->dao->findById($productID)->from(TABLE_PRODUCT)->fetch('name');
$productName = !empty($product->name) ? $product->name : '';
$browseType = isset($this->lang->bug->featureBar['browse'][$browseType]) ? $this->lang->bug->featureBar['browse'][$browseType] : zget($this->lang->bug->moreSelects, $browseType, '');
$fileName = $productName . $this->lang->dash . $browseType . $fileName;
+1 -1
View File
@@ -10,7 +10,7 @@ $lang->port->reservedWord['code'] = '代号';
$lang->port->reservedWord['name'] = '名称';
$lang->port->reservedWord['title'] = '标题';
$lang->port->importCase = '导入EXCEL';
$lang->port->importCase = '导入Excel';
$lang->port->importNotice = '请先导出模板,按照模板格式填写数据后再导入。';
$lang->port->noRequire = '%s行的“ %s” 是必填字段,不能为空。';
$lang->port->exportTemplate = '导出模板';
+5
View File
@@ -88,9 +88,11 @@ $config->testcase->datatable->fieldList['id']['required'] = 'yes';
$config->testcase->datatable->fieldList['product']['title'] = 'priAB';
$config->testcase->datatable->fieldList['product']['control'] = 'hidden';
$config->testcase->datatable->fieldList['product']['dataSource'] = array('module' => 'product', 'method' => 'getPairs', 'params' => '&0&&all');
$config->testcase->datatable->fieldList['module']['title'] = 'module';
$config->testcase->datatable->fieldList['module']['control'] = 'select';
$config->testcase->datatable->fieldList['module']['dataSource'] = array('module' => 'tree', 'method' => 'getOptionMenu', 'params' => '$productID&case');
$config->testcase->datatable->fieldList['pri']['title'] = 'priAB';
$config->testcase->datatable->fieldList['pri']['fixed'] = 'left';
@@ -107,6 +109,7 @@ $config->testcase->datatable->fieldList['branch']['title'] = 'branch';
$config->testcase->datatable->fieldList['branch']['fixed'] = 'left';
$config->testcase->datatable->fieldList['branch']['width'] = '100';
$config->testcase->datatable->fieldList['branch']['required'] = 'no';
$config->testcase->datatable->fieldList['branch']['dataSource'] = array('module' => 'port', 'method' => 'getRelatedObjects', 'params' => 'testcase&branch&id,name');
$config->testcase->datatable->fieldList['type']['title'] = 'type';
$config->testcase->datatable->fieldList['type']['fixed'] = 'no';
@@ -202,6 +205,7 @@ $config->testcase->datatable->fieldList['story']['fixed'] = 'no';
$config->testcase->datatable->fieldList['story']['width'] = '90';
$config->testcase->datatable->fieldList['story']['required'] = 'no';
$config->testcase->datatable->fieldList['story']['control'] = 'select';
$config->testcase->datatable->fieldList['story']['dataSource'] = array('module' => 'story', 'method' => 'getProductStoryPairs', 'params' => '$productID&$branch');
$config->testcase->datatable->fieldList['bugs']['title'] = 'B';
$config->testcase->datatable->fieldList['bugs']['fixed'] = 'no';
@@ -216,6 +220,7 @@ $config->testcase->datatable->fieldList['results']['width'] = '32';
$config->testcase->datatable->fieldList['results']['required'] = 'no';
$config->testcase->datatable->fieldList['results']['sort'] = 'no';
$config->testcase->datatable->fieldList['results']['name'] = $lang->testcase->results;
$config->testcase->datatable->fieldList['results']['dataSource'] = array('lang' => 'resultList');
$config->testcase->datatable->fieldList['stepNumber']['title'] = 'S';
$config->testcase->datatable->fieldList['stepNumber']['fixed'] = 'no';