From 9746936437a2f892f6886bd8c8d58cc671f5bc61 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Mon, 5 Dec 2022 16:22:32 +0800 Subject: [PATCH 1/6] * Finish Task #78664 --- db/update18.0.sql | 2 ++ db/zentao.sql | 2 +- module/branch/control.php | 11 +++++++---- module/build/js/common.js | 14 ++++++++++++-- module/build/model.php | 16 +++++++++++++--- module/build/view/create.html.php | 16 ++++++++++------ 6 files changed, 45 insertions(+), 16 deletions(-) diff --git a/db/update18.0.sql b/db/update18.0.sql index ecdd8e79a2..926795ad20 100644 --- a/db/update18.0.sql +++ b/db/update18.0.sql @@ -1,3 +1,5 @@ ALTER TABLE `zt_story` ADD COLUMN `siblings` varchar(255) NOT NULL AFTER `linkRequirements`; ALTER TABLE `zt_productplan` MODIFY COLUMN `branch` varchar(255) NOT NULL DEFAULT '0'; + +ALTER TABLE `zt_build` MODIFY COLUMN `branch` varchar(255) NOT NULL DEFAULT '0'; \ No newline at end of file diff --git a/db/zentao.sql b/db/zentao.sql index f17e27812a..f6bc348d57 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -321,7 +321,7 @@ CREATE TABLE IF NOT EXISTS `zt_build` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `project` mediumint(8) unsigned NOT NULL, `product` mediumint(8) unsigned NOT NULL default '0', - `branch` mediumint(8) unsigned NOT NULL default '0', + `branch` varchar(255) NOT NULL DEFAULT '0', `execution` mediumint(8) unsigned NOT NULL default '0', `builds` varchar(255) NOT NULL, `name` char(150) NOT NULL, diff --git a/module/branch/control.php b/module/branch/control.php index f362b79248..93009d3205 100644 --- a/module/branch/control.php +++ b/module/branch/control.php @@ -257,20 +257,21 @@ class branch extends control * * @param int $productID * @param int $oldBranch - * @param string $param + * @param string $browseType * @param int $projectID * @param bool $withMainBranch * @param string $isSiblings * @param string $fieldID + * @param string $multiple * @access public * @return void */ - public function ajaxGetBranches($productID, $oldBranch = 0, $param = 'all', $projectID = 0, $withMainBranch = true, $isSiblings = 'no', $fieldID = '0') + public function ajaxGetBranches($productID, $oldBranch = 0, $browseType = 'all', $projectID = 0, $withMainBranch = true, $isSiblings = 'no', $fieldID = '0', $multiple = '') { $product = $this->loadModel('product')->getById($productID); if(empty($product) or $product->type == 'normal') return; - $branches = $this->loadModel('branch')->getList($productID, $projectID, $param, 'order', null, $withMainBranch); + $branches = $this->loadModel('branch')->getList($productID, $projectID, $browseType, 'order', null, $withMainBranch); $branchTagOption = array(); foreach($branches as $branchInfo) { @@ -282,8 +283,10 @@ class branch extends control $branchTagOption[$oldBranch] = $oldBranch == BRANCH_MAIN ? $branch : ($branch->name . ($branch->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '')); } + $name = $multiple == 'multiple' ? 'branch[]' : 'branch'; + if($isSiblings == 'yes') return print(html::select("branches[$fieldID]", $branchTagOption, $oldBranch, "onchange='loadBranchRelation(this.value, $fieldID);' class='form-control chosen control-branch'")); - return print(html::select('branch', $branchTagOption, $oldBranch, "class='form-control' onchange='loadBranch(this)' data-last='{$oldBranch}'")); + return print(html::select($name, $branchTagOption, $oldBranch, "class='form-control' $multiple onchange='loadBranch(this)' data-last='{$oldBranch}'")); } /** diff --git a/module/build/js/common.js b/module/build/js/common.js index 4dbf5d9cec..8f0538b32f 100644 --- a/module/build/js/common.js +++ b/module/build/js/common.js @@ -7,6 +7,11 @@ */ function loadBranches(productID) { + if($('input[name=isIntegrated]:checked').val() == 'yes') + { + $('#branchBox').closest('tr').addClass('hidden'); + return false; + } $('#branch').remove(); $('#branch_chosen').remove(); var oldBranch = 0; @@ -16,12 +21,17 @@ function loadBranches(productID) } projectID = currentTab == 'execution' ? executionID : projectID; - $.get(createLink('branch', 'ajaxGetBranches', 'productID=' + productID + '&oldBranch=0¶m=active&projectID=' + projectID), function(data) + $.get(createLink('branch', 'ajaxGetBranches', 'productID=' + productID + '&oldBranch=0¶m=active&projectID=' + projectID + '&withMainBranch=true&isSiblings=no&fieldID=0&multiple=multiple'), function(data) { if(data) { - $('#product').closest('.input-group').append(data); + $('#branchBox').append(data); $('#branch').chosen(); + $('#branchBox').closest('tr').removeClass('hidden'); + } + else + { + $('#branchBox').closest('tr').addClass('hidden'); } }); } diff --git a/module/build/model.php b/module/build/model.php index baa9253ead..d1d7caa077 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -382,21 +382,31 @@ class buildModel extends model ->setDefault('product', 0) ->setDefault('branch', 0) ->setDefault('builds', '') - ->cleanInt('product,branch') + ->cleanInt('product') ->add('createdBy', $this->app->user->account) ->add('createdDate', helper::now()) ->stripTags($this->config->build->editor->create['id'], $this->config->allowedTags) - ->join('builds', ',') + ->join('builds,', ',') + ->join('branch', ',') ->remove('resolvedBy,allchecker,files,labels,isIntegrated,uid') ->get(); if($this->post->isIntegrated == 'yes') $build->execution = 0; + $product = $this->loadModel('product')->getByID($build->product); + if($product->type != 'normal' and !isset($_POST['branch'])) + { + $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]); + dao::$errors['branch'] = sprintf($this->lang->error->notempty, $this->lang->product->branch); + } + + if(dao::isError()) return false; + $build = $this->loadModel('file')->processImgURL($build, $this->config->build->editor->create['id'], $this->post->uid); $this->dao->insert(TABLE_BUILD)->data($build) ->autoCheck() ->batchCheck($this->config->build->create->requiredFields, 'notempty') - ->check('name', 'unique', "product = {$build->product} AND branch = {$build->branch} AND deleted = '0'") + ->check('name', 'unique', "product = {$build->product} AND branch = '{$build->branch}' AND deleted = '0'") ->checkFlow() ->exec(); diff --git a/module/build/view/create.html.php b/module/build/view/create.html.php index 543af32def..7dfb47c48a 100644 --- a/module/build/view/create.html.php +++ b/module/build/view/create.html.php @@ -33,12 +33,6 @@
id, "onchange='loadBranches(this.value);' class='form-control chosen' required");?> - type != 'normal') - { - echo "" . html::select('branch', $branches, key($product->branches), "class='form-control chosen'"); - } - ?>
@@ -50,6 +44,16 @@ + type != 'normal'): ?> + + build->branch;?> + +
+ branches), "class='form-control chosen' multiple required"); ?> +
+ + + build->builds;?> build->placeholder->multipleSelect}'");?> From bc2bceb7a7567a740c8b4b4a513da86138abf01a Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Tue, 6 Dec 2022 09:36:36 +0800 Subject: [PATCH 2/6] * Finish Bug #30543 --- module/story/control.php | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index 3ac09a9c79..ec4cbed451 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -298,7 +298,14 @@ class story extends control } $users = $this->user->getPairs('pdfirst|noclosed|nodeleted'); - $moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch === 'all' ? 0 : $branch); + + $branchData = explode(',', $branch); + foreach($branchData as $branchItem) + { + $branch = $branchItem; + $moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch === 'all' ? 0 : $branch); + break; + } if(empty($moduleOptionMenu)) return print(js::locate(helper::createLink('tree', 'browse', "productID=$productID&view=story"))); /* Init vars. */ @@ -440,7 +447,8 @@ class story extends control $this->view->users = $users; $this->view->moduleID = $moduleID; $this->view->moduleOptionMenu = $moduleOptionMenu; - $this->view->plans = str_replace('2030-01-01', $this->lang->story->undetermined, $this->loadModel('productplan')->getPairsForStory($productID, $branch == 0 ? '' : $branch, 'skipParent|unexpired|noclosed')); $this->view->planID = $planID; + $this->view->plans = str_replace('2030-01-01', $this->lang->story->undetermined, $this->loadModel('productplan')->getPairsForStory($productID, $branch == 0 ? '' : $branch, 'skipParent|unexpired|noclosed')); + $this->view->planID = $planID; $this->view->source = $source; $this->view->sourceNote = $sourceNote; $this->view->color = $color; @@ -658,8 +666,14 @@ class story extends control $branches = $product->type != 'normal' ? $this->loadModel('branch')->getPairs($productID, 'active') : array(); } - $moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch === 'all' ? 0 : $branch); - $moduleOptionMenu['ditto'] = $this->lang->story->ditto; + $branchData = explode(',', $branch); + foreach($branchData as $branchItem) + { + $branch = $branchItem; + $moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch === 'all' ? 0 : $branch); + $moduleOptionMenu['ditto'] = $this->lang->story->ditto; + break; + } /* Get reviewers. */ $reviewers = $product->reviewer; From 0adbd8e27af2c7cdda802102df903693e3faf0b6 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Tue, 6 Dec 2022 10:16:34 +0800 Subject: [PATCH 3/6] * Finish Bug #30541 --- module/productplan/model.php | 2 +- module/story/model.php | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/module/productplan/model.php b/module/productplan/model.php index d378d62382..dcd64d775d 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -340,7 +340,7 @@ class productplanModel extends model ->andWhere('deleted')->eq(0) ->beginIF(strpos($param, 'unexpired') !== false)->andWhere('end')->ge($date)->fi() ->beginIF(strpos($param, 'noclosed') !== false)->andWhere('status')->ne('closed')->fi() - ->beginIF($branch !== 'all' and $branch !== '')->andWhere($branchQuery)->fi() + ->beginIF($branch !== 'all' and $branch !== '' and !empty($branchQuery))->andWhere($branchQuery)->fi() ->orderBy('begin desc') ->fetchAll('id'); diff --git a/module/story/model.php b/module/story/model.php index 05472837b3..69e29a5af4 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -2229,14 +2229,17 @@ class storyModel extends model if($oldStory->stage == 'wait') $story->stage = 'planned'; if($this->session->currentProductType and $this->session->currentProductType != 'normal' and $oldStory->branch == 0) { - if(!isset($oldStoryStages[$storyID][$plan->branch])) + foreach(explode(',', $plan->branch) as $planBranch) { - $story->stage = 'planned'; - $newStoryStage = new stdclass(); - $newStoryStage->story = $storyID; - $newStoryStage->branch = $plan->branch; - $newStoryStage->stage = $story->stage; - $this->dao->insert(TABLE_STORYSTAGE)->data($newStoryStage)->autoCheck()->exec(); + if(!isset($oldStoryStages[$storyID][$planBranch])) + { + $story->stage = 'planned'; + $newStoryStage = new stdclass(); + $newStoryStage->story = $storyID; + $newStoryStage->branch = $planBranch; + $newStoryStage->stage = $story->stage; + $this->dao->insert(TABLE_STORYSTAGE)->data($newStoryStage)->autoCheck()->exec(); + } } } } From 55aac8c426c33876e68ff630a59c69f4fc711b72 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Tue, 6 Dec 2022 16:51:58 +0800 Subject: [PATCH 4/6] * Finish Task #78664 --- module/build/control.php | 17 +++++++++++++++-- module/build/js/create.js | 3 +-- module/build/js/edit.js | 3 +-- module/build/model.php | 33 ++++++++++++++++++++++++++++----- module/build/view/edit.html.php | 16 ++++++++++------ module/execution/control.php | 2 +- module/execution/model.php | 2 +- module/productplan/model.php | 2 +- module/story/control.php | 22 ++++++++-------------- 9 files changed, 66 insertions(+), 34 deletions(-) diff --git a/module/build/control.php b/module/build/control.php index 767239b781..bae863860c 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -199,7 +199,10 @@ class build extends control { $branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : ''); } - if(!isset($branchTagOption[$build->branch])) $branchTagOption[$build->branch] = $this->branch->getById($build->branch, 0, 'name'); + foreach(explode(',', $build->branch) as $buildBranch) + { + if(!isset($branchTagOption[$buildBranch])) $branchTagOption[$buildBranch] = $this->branch->getById($buildBranch, 0, 'name'); + } foreach($productGroups as $product) $products[$product->id] = $product->name; @@ -306,6 +309,16 @@ class build extends control $this->view->generatedBugPager = $generatedBugPager; $this->executeHooks($buildID); + $branchName = ''; + if($build->productType != 'normal') + { + foreach(explode(',', $build->branch) as $buildBranch) + { + $branchName .= $this->loadModel('branch')->getById($buildBranch); + $branchName .= ','; + } + $branchName = trim($branchName, ','); + } /* Assign. */ $this->view->canBeChanged = common::canBeChanged('build', $build); // Determines whether an object is editable. @@ -321,7 +334,7 @@ class build extends control $this->view->bugs = $bugs; $this->view->type = $type; $this->view->bugPager = $bugPager; - $this->view->branchName = $build->productType == 'normal' ? '' : $this->loadModel('branch')->getById($build->branch); + $this->view->branchName = $branchName; if($this->app->getViewType() == 'json') { diff --git a/module/build/js/create.js b/module/build/js/create.js index b84d711c00..f74d9ca74e 100644 --- a/module/build/js/create.js +++ b/module/build/js/create.js @@ -9,8 +9,7 @@ $().ready(function() { var projectID = $('#project').val(); var productID = $('#product').val(); - var branch = $('#branch').length > 0 ? $('#branch').val() : ''; - $.get(createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + productID + '&varName=builds&build=&branch=' + branch + '&index=&needCreate=&type=noempty,notrunk,separate,singled&extra=multiple'), function(data) + $.get(createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + productID + '&varName=builds&build=&branch=all&index=&needCreate=&type=noempty,notrunk,separate,singled&extra=multiple'), function(data) { if(data) $('#buildBox').html(data); $('#builds').attr('data-placeholder', multipleSelect).chosen(); diff --git a/module/build/js/edit.js b/module/build/js/edit.js index 7088791ec2..f5a81757a8 100644 --- a/module/build/js/edit.js +++ b/module/build/js/edit.js @@ -10,8 +10,7 @@ $().ready(function() else { var productID = $('#product').val(); - var branch = $('#branch').val(); - $.get(createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + productID + '&varName=builds&build=&branch=' + branch + '&index=&needCreate=&type=noempty,notrunk,separate,singled&extra=multiple'), function(data) + $.get(createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + productID + '&varName=builds&build=&branch=all&index=&needCreate=&type=noempty,notrunk,separate,singled&extra=multiple'), function(data) { if(data) $('#buildBox').html(data); $('#builds').attr('data-placeholder', multipleSelect).chosen(); diff --git a/module/build/model.php b/module/build/model.php index d1d7caa077..090beb297e 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -386,15 +386,28 @@ class buildModel extends model ->add('createdBy', $this->app->user->account) ->add('createdDate', helper::now()) ->stripTags($this->config->build->editor->create['id'], $this->config->allowedTags) - ->join('builds,', ',') + ->join('builds', ',') ->join('branch', ',') ->remove('resolvedBy,allchecker,files,labels,isIntegrated,uid') ->get(); - if($this->post->isIntegrated == 'yes') $build->execution = 0; + if($this->post->isIntegrated == 'yes') + { + $build->execution = 0; + $branchPairs = $this->dao->select('branch')->from(TABLE_BUILD)->where('id')->in($build->builds)->fetchPairs(); + $relationBranch = array(); + foreach($branchPairs as $branches) + { + foreach(explode(',', $branches) as $branch) + { + if(!isset($relationBranch[$branch])) $relationBranch[$branch] = $branch; + } + } + $build->branch = implode(',', $relationBranch); + } $product = $this->loadModel('product')->getByID($build->product); - if($product->type != 'normal' and !isset($_POST['branch'])) + if($product->type != 'normal' and $this->post->isIntegrated == 'no' and !isset($_POST['branch'])) { $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]); dao::$errors['branch'] = sprintf($this->lang->error->notempty, $this->lang->product->branch); @@ -436,17 +449,27 @@ class buildModel extends model ->setIF(!isset($_POST['branch']), 'branch', $oldBuild->branch) ->setDefault('product', $oldBuild->product) ->setDefault('builds', '') - ->cleanInt('product,branch,execution') + ->cleanInt('product,execution') ->join('builds', ',') + ->join('branch', ',') ->remove('allchecker,resolvedBy,files,labels,uid') ->get(); + $product = $this->loadModel('product')->getByID($build->product); + if($product->type != 'normal' and $this->post->isIntegrated == 'no' and !isset($_POST['branch'])) + { + $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]); + dao::$errors['branch'] = sprintf($this->lang->error->notempty, $this->lang->product->branch); + } + + if(dao::isError()) return false; + $build = $this->loadModel('file')->processImgURL($build, $this->config->build->editor->edit['id'], $this->post->uid); $this->dao->update(TABLE_BUILD)->data($build) ->autoCheck() ->batchCheck($this->config->build->edit->requiredFields, 'notempty') ->where('id')->eq($buildID) - ->check('name', 'unique', "id != $buildID AND product = {$build->product} AND branch = {$build->branch} AND deleted = '0'") + ->check('name', 'unique', "id != $buildID AND product = {$build->product} AND branch = '{$build->branch}' AND deleted = '0'") ->checkFlow() ->exec(); if(isset($build->branch) and $oldBuild->branch != $build->branch) $this->dao->update(TABLE_RELEASE)->set('branch')->eq($build->branch)->where('build')->eq($buildID)->exec(); diff --git a/module/build/view/edit.html.php b/module/build/view/edit.html.php index 21e386d8d3..aa2912279f 100644 --- a/module/build/view/edit.html.php +++ b/module/build/view/edit.html.php @@ -32,16 +32,20 @@ ?>
product, "onchange='loadBranches(this.value);' class='form-control chosen' $disabled required");?> - productType != 'normal') - { - echo "" . html::select('branch', $branchTagOption, $build->branch, "class='form-control chosen' $disabled"); - } - ?>
build->notice->changeProduct;?> + type != 'normal'): ?> + + build->branch;?> + +
+ branch, "class='form-control chosen' multiple required $disabled"); ?> +
+ + + execution):?> diff --git a/module/execution/control.php b/module/execution/control.php index d768d36b23..acce62c2ea 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -4144,7 +4144,7 @@ class execution extends control foreach($planStory as $id => $story) { $projectBranches = zget($projectProducts, $story->product, array()); - if($story->status == 'draft' or $story->status == 'reviewing' or (!empty($story->branch) and !empty($projectBranches) and !isset($projectBranches[$story->branch]))) + if($story->status != 'active' or (!empty($story->branch) and !empty($projectBranches) and !isset($projectBranches[$story->branch]))) { $count++; unset($planStory[$id]); diff --git a/module/execution/model.php b/module/execution/model.php index ac9033160a..a272b7b283 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2937,7 +2937,7 @@ class executionModel extends model { foreach($planStory as $id => $story) { - if($story->status == 'draft' or $story->status == 'reviewing' or (!empty($story->branch) and !empty($executionBranches) and !isset($executionBranches[$story->branch]))) + if($story->status != 'active' or (!empty($story->branch) and !empty($executionBranches) and !isset($executionBranches[$story->branch]))) { unset($planStory[$id]); continue; diff --git a/module/productplan/model.php b/module/productplan/model.php index dcd64d775d..7f1273fb81 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -1069,7 +1069,7 @@ class productplanModel extends model foreach($planStory as $id => $story) { $projectBranches = zget($projectProducts, $story->product, array()); - if($story->status == 'draft' or $story->status == 'reviewing' or (!empty($story->branch) and !empty($projectBranches) and !isset($projectBranches[$story->branch]))) + if($story->status == 'active' or (!empty($story->branch) and !empty($projectBranches) and !isset($projectBranches[$story->branch]))) { unset($planStory[$id]); continue; diff --git a/module/story/control.php b/module/story/control.php index ec4cbed451..1c02ef532c 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -298,14 +298,11 @@ class story extends control } $users = $this->user->getPairs('pdfirst|noclosed|nodeleted'); - + $branchData = explode(',', $branch); - foreach($branchData as $branchItem) - { - $branch = $branchItem; - $moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch === 'all' ? 0 : $branch); - break; - } + $branch = current($branchData); + $moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch === 'all' ? 0 : $branch); + if(empty($moduleOptionMenu)) return print(js::locate(helper::createLink('tree', 'browse', "productID=$productID&view=story"))); /* Init vars. */ @@ -667,13 +664,10 @@ class story extends control } $branchData = explode(',', $branch); - foreach($branchData as $branchItem) - { - $branch = $branchItem; - $moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch === 'all' ? 0 : $branch); - $moduleOptionMenu['ditto'] = $this->lang->story->ditto; - break; - } + $branch = current($branchData); + + $moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch === 'all' ? 0 : $branch); + $moduleOptionMenu['ditto'] = $this->lang->story->ditto; /* Get reviewers. */ $reviewers = $product->reviewer; From 4cbf1397b89a0d3bc24acf4d39442e7d93d06b41 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Tue, 6 Dec 2022 17:18:57 +0800 Subject: [PATCH 5/6] * Finish Task #78671 --- module/build/view/create.html.php | 4 +--- module/build/view/edit.html.php | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/module/build/view/create.html.php b/module/build/view/create.html.php index 7dfb47c48a..d2b96aadc9 100644 --- a/module/build/view/create.html.php +++ b/module/build/view/create.html.php @@ -44,8 +44,7 @@ - type != 'normal'): ?> - + '> build->branch;?>
@@ -53,7 +52,6 @@
- build->builds;?> build->placeholder->multipleSelect}'");?> diff --git a/module/build/view/edit.html.php b/module/build/view/edit.html.php index aa2912279f..31dfe9dcaf 100644 --- a/module/build/view/edit.html.php +++ b/module/build/view/edit.html.php @@ -36,8 +36,8 @@ build->notice->changeProduct;?> - type != 'normal'): ?> + '> build->branch;?>
@@ -45,7 +45,6 @@
- execution):?> From e6df8be8a655c4bede5816f3ef852144b2f1cc6e Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Wed, 7 Dec 2022 09:21:19 +0800 Subject: [PATCH 6/6] add default branch --- module/build/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/build/control.php b/module/build/control.php index 562595c968..021f442967 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -334,7 +334,7 @@ class build extends control $this->view->bugs = $bugs; $this->view->type = $type; $this->view->bugPager = $bugPager; - $this->view->branchName = $branchName; + $this->view->branchName = empty($branchName) ? $this->lang->branch->main : $branchName; $this->view->childBuilds = empty($build->builds) ? array() : $this->dao->select('id,name,bugs,stories')->from(TABLE_BUILD)->where('id')->in($build->builds)->fetchAll(); if($this->app->getViewType() == 'json')