From fde21ff89779d3fe57df8cac2f5e8370b6b533c7 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 11 Nov 2022 17:06:48 +0800 Subject: [PATCH 1/3] * Fix bug#29549,#29654. --- module/doc/model.php | 8 -------- 1 file changed, 8 deletions(-) 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); From 549290cf9d5d824201d893c9d4cb63ea171950b0 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 11 Nov 2022 17:35:34 +0800 Subject: [PATCH 2/3] * fix bug for create project release. --- module/projectrelease/control.php | 2 +- module/projectrelease/js/create.js | 3 ++- module/projectrelease/view/create.html.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) 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'");?>
From def5bab5f495de24f14bf915c8b66f420ca11be4 Mon Sep 17 00:00:00 2001 From: wangyuting <851424971@qq.com> Date: Mon, 14 Nov 2022 03:09:41 +0000 Subject: [PATCH 3/3] * Fix bug. --- module/build/model.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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)