Merge branch 'zenops_46' of https://gitlab.zcorp.cc/easycorp/zentaopms into zenops_46

This commit is contained in:
zhaoke
2022-12-21 06:00:42 +00:00
4 changed files with 11 additions and 8 deletions
+8 -5
View File
@@ -2346,15 +2346,18 @@ class bug extends control
{
$this->loadModel('transfer');
$this->session->set('bugTransferParams', array('productID' => $productID, 'executionID' => $executionID, 'branch' => 'all'));
if(!$productID)
if(!$productID or $browseType == 'bysearch')
{
$this->config->bug->datatable->fieldList['module']['dataSource']['method'] = 'getAllModulePairs';
$this->config->bug->datatable->fieldList['module']['dataSource']['params'] = 'bug';
$object = $this->dao->findById($executionID)->from(TABLE_EXECUTION)->fetch();
$projectID = $object->type == 'project' ? $object->id : $object->parent;
$this->config->bug->datatable->fieldList['project']['dataSource'] = array('module' => 'project', 'method' => 'getPairsByIdList', 'params' => $projectID);
$this->config->bug->datatable->fieldList['execution']['dataSource'] = array('module' => 'execution', 'method' => 'getPairs', 'params' => $projectID);
if($executionID)
{
$object = $this->dao->findById($executionID)->from(TABLE_EXECUTION)->fetch();
$projectID = $object->type == 'project' ? $object->id : $object->parent;
$this->config->bug->datatable->fieldList['project']['dataSource'] = array('module' => 'project', 'method' => 'getPairsByIdList', 'params' => $projectID);
$this->config->bug->datatable->fieldList['execution']['dataSource'] = array('module' => 'execution', 'method' => 'getPairs', 'params' => $projectID);
}
}
$this->transfer->export('bug');
+1 -1
View File
@@ -89,7 +89,7 @@
<?php if($build->executionDeleted) $executionName = "<del>$executionName</del>";?>
<?php echo $executionName;?>
<?php if($build->executionDeleted):?>
<span class='label label-danger' style='position:absolute;right:0px;top:7px;'><?php echo $lang->build->deleted;?></span>
<span class='label label-danger'><?php echo $lang->build->deleted;?></span>
<?php endif; ?>
</td>
<?php else:?>
+1 -1
View File
@@ -2841,7 +2841,7 @@ class story extends control
{
$this->session->set('storyTransferParams', array('productID' => $productID, 'executionID' => $executionID));
/* Create field lists. */
if(!$productID)
if(!$productID or $browseType == 'bysearch')
{
$this->config->story->datatable->fieldList['branch']['dataSource'] = array('module' => 'branch', 'method' => 'getAllPairs', 'params' => 1);
$this->config->story->datatable->fieldList['module']['dataSource']['method'] = 'getAllModulePairs';
+1 -1
View File
@@ -649,7 +649,7 @@ class transferModel extends model
{
foreach($values as $field => $value)
{
if($fieldList[$field]['from'] == 'workflow') continue;
if(isset($fieldList[$field]['from']) and $fieldList[$field]['from'] == 'workflow') continue;
if(in_array($field, $dataSourceList))
{
if($fieldList[$field]['control'] == 'multiple')