Merge branch 'importExport' into 'master'

* Code for port.

See merge request easycorp/zentaopms!4875
This commit is contained in:
王怡栋
2022-08-10 01:32:04 +00:00
5 changed files with 19 additions and 6 deletions
+3 -3
View File
@@ -3569,13 +3569,13 @@ class bugModel extends model
foreach($bugs as $bug) $relatedObjectIdList[$bug->$object] = $bug->$object;
if($object == 'openedBuild') $object = 'build';
if($object == 'openedBuild' or $object == 'resolvedBuild') $object = 'build';
/* Get related objects title or names. */
$table = $this->config->objectTables[$object];
if($table) $relatedObjects = $this->dao->select($pairs)->from($table) ->where('id')->in($relatedObjectIdList)->fetchPairs();
if($table) $relatedObjects = $this->dao->select($pairs)->from($table)->where('id')->in($relatedObjectIdList)->fetchPairs();
if($object == 'build') $relatedObjects= array('trunk' => $this->lang->trunk) + $relatedObjects;
if(in_array($object, array('build','resolvedBuild'))) $relatedObjects= array('trunk' => $this->lang->trunk) + $relatedObjects;
return $relatedObjects;
}