* Code for lite story export.

This commit is contained in:
tanghucheng
2022-08-14 16:16:40 +08:00
parent 90f16b91ca
commit 087c4a37b1
5 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
<?php
$config->story->list->exportFields = '
$config->story->exportFields = '
id, module, title, spec, keywords,
pri, estimate, status,
openedBy, openedDate, assignedTo, assignedDate, mailto,
+4
View File
@@ -144,6 +144,10 @@ class port extends control
{
$filter = '';
if($model == 'task') $filter = 'estimate';
if($model == 'story')
{
if($this->session->storyType) $this->loadModel('story')->replaceUserRequirementLang();
}
$this->loadModel($model);
$importFields = !empty($_SESSION[$model . 'TemplateFields']) ? $_SESSION[$model . 'TemplateFields'] : $this->config->$model->templateFields;
+3 -2
View File
@@ -760,8 +760,9 @@ class portModel extends model
}
elseif($queryCondition)
{
$selectKey = 't1.id';
if(strpos($queryCondition, "FROM `{$this->config->db->prefix}_$model` AS t1") == false) $selectKey = 't2.id';
$selectKey = 'id';
if(strpos($queryCondition, "FROM `{$this->config->db->prefix}_$model` AS t1") == false) $selectKey = 't1.id';
if(strpos($queryCondition, "FROM `{$this->config->db->prefix}_$model` AS t2") == false) $selectKey = 't2.id';
$stmt = $this->dbh->query($queryCondition . ($this->post->exportType == 'selected' ? " AND $selectKey IN({$this->cookie->checkedItem})" : ''));
while($row = $stmt->fetch()) $modelDatas[$row->id] = $row;
+1
View File
@@ -218,6 +218,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';
+1 -1
View File
@@ -44,7 +44,7 @@
<?php include $app->getModuleRoot() . 'port/view/tfoot.html.php';?>
</tfoot>
</table>
<?php if(!$insert and $dataInsert === '') include $app->getModuleRoot() . 'common/view/noticeimport.html.php';?>
<?php if(!$this->session->insert) include $app->getModuleRoot() . 'common/view/noticeimport.html.php';?>
</form>
</div>
<?php include $app->getModuleRoot() . 'port/view/footer.html.php';?>