From d35edfab0e8fb5db3604e762f8e934b79e3f7f27 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Wed, 13 Mar 2024 15:56:12 +0800 Subject: [PATCH] * Fix bug #46732. --- module/bug/ui/batchcreate.html.php | 2 +- module/bug/zen.php | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/module/bug/ui/batchcreate.html.php b/module/bug/ui/batchcreate.html.php index ef42d4223a..7f145d43d3 100644 --- a/module/bug/ui/batchcreate.html.php +++ b/module/bug/ui/batchcreate.html.php @@ -39,7 +39,7 @@ $items[] = array('name' => 'id', 'label' => $lang->idAB, 'control' => 'index', ' if($bugs) $items[] = array('name' => 'uploadImage', 'label' => '', 'control' => 'hidden', 'hidden' => true); /* Field of branch. */ -if($product->type != 'normal') $items[] = array('name' => 'branch', 'label' => $lang->product->branchName[$product->type], 'control' => 'picker', 'items' => $branches, 'value' => $branch, 'width' => '200px', 'ditto' => true); +if($product->type != 'normal') $items[] = array('name' => 'branch', 'label' => $lang->product->branchName[$product->type], 'control' => 'picker', 'items' => $branches, 'value' => $branch, 'width' => '200px', 'ditto' => true, 'hidden' => strpos(",{$showFields},", ',branch,') === false); /* Field of module. */ $items[] = array('name' => 'module', 'label' => $lang->bug->module, 'control' => 'picker', 'items' => $moduleOptionMenu, 'value' => $moduleID, 'width' => '200px', 'required' => isset($requiredFields['module']), 'ditto' => true); diff --git a/module/bug/zen.php b/module/bug/zen.php index 8241ec48c8..069fda3f9e 100644 --- a/module/bug/zen.php +++ b/module/bug/zen.php @@ -1517,15 +1517,7 @@ class bugZen extends bug /* Set display fields. */ $showFields = $this->config->bug->custom->batchCreateFields; - if($product->type != 'normal') - { - $showFields = sprintf($showFields, 'branch'); - $showFields = trim($showFields, ','); - } - else - { - $showFields = trim(sprintf($showFields, ''), ','); - } + $showFields = trim(sprintf($showFields, ''), ','); /* Get titles from uploaded images. */ if(!empty($bugImagesFile))