diff --git a/module/bug/control.php b/module/bug/control.php index 85a2df91f5..0d1d970d54 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -973,7 +973,7 @@ class bug extends control $this->view->projects = array(0 => '') + $this->product->getProjectPairsByProduct($productID, $bug->branch, $bug->project); $this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $bug->branch); $this->view->currentModuleID = $currentModuleID; - $this->view->executions = array(0 => '') + $this->product->getExecutionPairsByProduct($bug->product, $bug->branch ? "0,{$bug->branch}" : 0, 'id_desc', $projectID); + $this->view->executions = array(0 => '') + $this->product->getExecutionPairsByProduct($bug->product, $bug->branch, 'id_desc', $bug->project); $this->view->stories = $bug->execution ? $this->story->getExecutionStoryPairs($bug->execution) : $this->story->getProductStoryPairs($bug->product, $bug->branch); $this->view->branches = $branches; $this->view->tasks = $this->task->getExecutionTaskPairs($bug->execution); diff --git a/module/execution/model.php b/module/execution/model.php index 403016698c..16154abab2 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1323,7 +1323,7 @@ class executionModel extends model { $link = helper::createLink($module, $method, "productID=0&branch=0&extra=executionID=%s"); } - elseif(in_array($module, array('bug', 'case', 'testtask', 'testreport')) and $method == 'view') + elseif(in_array($module, array('bug', 'case', 'testtask', 'testreport')) and strpos(',view,edit,', ",$method,") !== false) { $link = helper::createLink('execution', $module, "executionID=%s"); }