diff --git a/module/build/model.php b/module/build/model.php index 2ff01927dd..6a49cfb637 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -311,11 +311,16 @@ class buildModel extends model $build->stories = ''; $build->bugs = ''; - if($projectID) + if($projectID && !$executionID) { $project = $this->loadModel('project')->getByID($projectID); if(!$project->multiple) $executionID = $this->dao->select('id')->from(TABLE_EXECUTION)->where('project')->eq($projectID)->fetch('id'); } + else if($executionID && !$projectID) + { + $execution = $this->loadModel('execution')->getByID($executionID); + $projectID = $execution->project; + } $build = fixer::input('post') ->setDefault('project', $projectID) diff --git a/module/doc/model.php b/module/doc/model.php index 2ee7feff60..e6ad6802d3 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -930,13 +930,6 @@ class docModel extends model { $this->loadModel('product'); - /* Fixed search modal for doc view. */ - if($this->app->getMethodName() == 'objectlibs') - { - $queryName = $type . 'Doc'; - $type = 'objectLibs'; - } - if($this->app->rawMethod == 'contribute') { $this->config->doc->search['module'] = 'contributeDoc'; @@ -960,7 +953,6 @@ class docModel extends model } else { - if(isset($queryName)) $this->config->doc->search['module'] = $queryName; $products = $this->product->getPairs('nocode', $this->session->project); $this->config->doc->search['params']['execution']['values'] = array('' => '') + $this->loadModel('execution')->getPairs($this->session->project, 'all', 'noclosed') + array('all' => $this->lang->doc->allExecutions); $this->config->doc->search['params']['lib']['values'] = array('' => '', $libID => ($libID ? $libs[$libID] : 0), 'all' => $this->lang->doclib->all); diff --git a/module/projectrelease/control.php b/module/projectrelease/control.php index a16c1aa687..616a6acfbf 100644 --- a/module/projectrelease/control.php +++ b/module/projectrelease/control.php @@ -49,7 +49,7 @@ class projectrelease extends control $this->view->products = $this->products; $this->view->product = $product; - $this->view->branches = (isset($product->type) and $product->type == 'normal') ? array() : $this->loadModel('branch')->getPairs($productID, 'active'); + $this->view->branches = (isset($product->type) and $product->type == 'normal') ? array() : $this->loadModel('branch')->getPairs($productID, 'active', $projectID); $this->view->branch = $branch; $this->view->project = $this->project->getByID($projectID); } diff --git a/module/projectrelease/js/create.js b/module/projectrelease/js/create.js index 36e9089d4b..e04f96c37c 100644 --- a/module/projectrelease/js/create.js +++ b/module/projectrelease/js/create.js @@ -45,9 +45,10 @@ function loadBranches(productID) if(data) { $inputGroup.append(data); + $inputGroup.find('#branch').attr('onchange', 'loadBuilds()'); $('#branch').css('width', '120px').chosen(); - loadBuilds(); } + loadBuilds(); $inputGroup.fixInputGroup(); }) } diff --git a/module/projectrelease/view/create.html.php b/module/projectrelease/view/create.html.php index 8477a26cfd..ea809f9afe 100644 --- a/module/projectrelease/view/create.html.php +++ b/module/projectrelease/view/create.html.php @@ -38,7 +38,7 @@
id, "onchange='loadBranches(this.value)' class='form-control chosen'");?> - type != 'normal') echo html::select('branch', $branches, $branch, "class='form-control chosen control-branch' onchange='loadBuilds()'");?> + type != 'normal') echo html::select('branch', $branches, $branch, "class='form-control chosen control-branch'");?>