Merge branch 'sprint_bug_30923' into 'zentaopms_277'

* Fix bug #30923.

See merge request easycorp/zentaopms!6649
This commit is contained in:
孙广明
2022-12-29 08:27:38 +00:00
+6 -1
View File
@@ -3713,8 +3713,13 @@ class bugModel extends model
/* 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($object == 'branch' and $this->session->currentProductType != 'normal')
{
$productID = current($bugs)->product;
$relatedObjects = $this->dao->select($pairs)->from($table)->where('product')->eq($productID)->fetchPairs();
}
if(in_array($object, array('build','resolvedBuild'))) $relatedObjects= array('trunk' => $this->lang->trunk) + $relatedObjects;
if(in_array($object, array('build','resolvedBuild','branch'))) $relatedObjects = array('trunk' => $this->lang->trunk) + $relatedObjects;
return array('' => '', 0 => '') + $relatedObjects;
}