* Fix bug config.

This commit is contained in:
tanghucheng
2022-07-08 15:34:31 +08:00
parent 160e739dc5
commit 6eb8428c4b
3 changed files with 9 additions and 0 deletions
+2
View File
@@ -85,6 +85,8 @@ $config->bug->fieldList['openedBy']['title'] = 'openedBy';
$config->bug->fieldList['openedDate']['title'] = 'openedDate';
$config->bug->fieldList['openedBuild']['title'] = 'openedBuild';
$config->bug->fieldList['openedBuild']['foreignKey'] = true;
$config->bug->fieldList['openedBuild']['foreignKeySource'] = array('module' => 'bug', 'method' =>'getRelatedObjects', 'params' => 'openedBuild&id,name');
$config->bug->fieldList['assignedTo']['title'] = 'assignedTo';
+6
View File
@@ -3457,6 +3457,12 @@ class bugModel extends model
$relatedObjectIdList[$bug->$object] = $bug->$object;
}
if($object == 'openedBuild')
{
$relatedObjectIdList = array('trunk' => $this->lang->trunk) + $relatedObjectIdList;
$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();