diff --git a/module/bug/model.php b/module/bug/model.php index dad2de58be..6cca6f7e6e 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -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; }