From a1482a591161ca6519cd609cebc02130561365b3 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Fri, 22 Dec 2023 10:53:41 +0800 Subject: [PATCH] * Fix bug #42167. --- module/project/control.php | 2 +- module/project/view/edit.html.php | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/module/project/control.php b/module/project/control.php index 04275bfd3d..676d1a6bd7 100755 --- a/module/project/control.php +++ b/module/project/control.php @@ -800,7 +800,7 @@ class project extends control $this->view->allProducts = array('0' => '') + $allProducts; $this->view->multiBranchProducts = $this->loadModel('product')->getMultiBranchPairs(); $this->view->productPlans = array_filter($productPlansOrder); - $this->view->linkedProducts = $linkedProducts; + $this->view->linkedProducts = $linkedProducts ? $linkedProducts : array('' => ''); $this->view->branches = $branches; $this->view->executions = $this->execution->getPairs($projectID); $this->view->unmodifiableProducts = $unmodifiableProducts; diff --git a/module/project/view/edit.html.php b/module/project/view/edit.html.php index c7489eb342..941dea4dd7 100755 --- a/module/project/view/edit.html.php +++ b/module/project/view/edit.html.php @@ -156,17 +156,19 @@
- type != 'normal' and isset($branchGroups[$product->id]);?> + type != 'normal' and isset($branchGroups[$product->id]);?>
'> productCommon;?> - id, "class='form-control chosen' onchange='loadBranches(this)' data-last='" . $product->id . "' data-type='" . $product->type . "'");?> + id : '';?> + type : '';?> +
'>
product->branchName['branch'];?> - branches);?> - id]) ? $branchGroups[$product->id] : array(), $branchIdList, "class='form-control chosen' multiple onchange=\"loadPlans('#products{$i}', this)\"");?> + branches) : '';?> +
@@ -174,7 +176,7 @@
> product->plan;?> - id][]", isset($productPlans[$product->id]) ? $productPlans[$product->id] : array(), $product->plans, "class='form-control chosen' multiple");?> + plans : '', "class='form-control chosen' multiple");?>
>