From c52fc593358ebf4352d4f3db8cd4313d080ebefb Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 13 Jul 2022 11:26:59 +0800 Subject: [PATCH] * Fix bug #25072. --- module/project/control.php | 5 ++++- module/project/view/create.html.php | 13 +++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/module/project/control.php b/module/project/control.php index e67c4917a4..ed73888b7c 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -493,7 +493,10 @@ class project extends control $products = $this->product->getProducts($copyProjectID); foreach($products as $product) { - $productPlans[$product->id] = $this->loadModel('productplan')->getPairs($product->id, '', 'noclosed'); + foreach($product->branches as $branch) + { + $productPlans[$product->id][$branch] = $this->loadModel('productplan')->getPairs($product->id, $branch, 'noclosed', true); + } } } diff --git a/module/project/view/create.html.php b/module/project/view/create.html.php index 6a8febe208..faf29c5965 100755 --- a/module/project/view/create.html.php +++ b/module/project/view/create.html.php @@ -109,16 +109,18 @@
+ branches as $branch):?>
type != 'normal' and isset($branchGroups[$product->id]);?>
id, "class='form-control chosen' onchange='loadBranches(this)' data-last='" . $product->id . "'");?> - id], key($product->branches), "class='form-control chosen' onchange=\"loadPlans('#products{$i}', this.value)\"");?> + id], $branch, "class='form-control chosen' onchange=\"loadPlans('#products{$i}', this.value)\"");?>
+
' style="padding-right: 6px;">
@@ -146,12 +148,15 @@ - id, array(0 => ''));?> -
id . "]", $plans, '', "class='form-control chosen' multiple");?>
+ id, array(0 => ''));?> + branches as $branch):?> + ''));?> +
id . '][' . $branch . '][]', $plans, '', "class='form-control chosen' multiple");?>
+ -
+