From a6246e8ad6d4c6feb4638b4745b84d284ed72c59 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 22 Nov 2021 15:02:04 +0800 Subject: [PATCH 1/3] * Fix bug #16533. --- module/story/view/batchedit.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/view/batchedit.html.php b/module/story/view/batchedit.html.php index 4aea40a00e..aa958d04bb 100644 --- a/module/story/view/batchedit.html.php +++ b/module/story/view/batchedit.html.php @@ -79,7 +79,7 @@ foreach(explode(',', $showFields) as $field) } if(!isset($modules[$story->product][$story->branch])) $modules[$story->product][$story->branch] = $this->tree->getOptionMenu($story->product, 'story', 0, $story->branch); - foreach($modules[$story->product][$story->branch] as $moduleID => $moduleName) $modules[$story->product][$story->branch][$moduleID] = '/' . $product->name . $moduleName; + foreach($modules[$story->product][$story->branch] as $moduleID => $moduleName) $modules[$story->product][$story->branch][$moduleID] = isset($modules[$story->product][$story->branch][$moduleID]) ? $moduleName : '/' . $product->name . $moduleName; $productPlans = $this->productplan->getPairs($story->product, $branch); } From f6797fe2eac670f4ef181ea9ffaa133057ae639a Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 22 Nov 2021 15:11:20 +0800 Subject: [PATCH 2/3] * Modify the code. --- module/story/view/batchedit.html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/story/view/batchedit.html.php b/module/story/view/batchedit.html.php index aa958d04bb..a595620fac 100644 --- a/module/story/view/batchedit.html.php +++ b/module/story/view/batchedit.html.php @@ -78,8 +78,8 @@ foreach(explode(',', $showFields) as $field) foreach($branches as $branchID => $branchName) $branches[$branchID] = '/' . $product->name . '/' . $branchName; } - if(!isset($modules[$story->product][$story->branch])) $modules[$story->product][$story->branch] = $this->tree->getOptionMenu($story->product, 'story', 0, $story->branch); - foreach($modules[$story->product][$story->branch] as $moduleID => $moduleName) $modules[$story->product][$story->branch][$moduleID] = isset($modules[$story->product][$story->branch][$moduleID]) ? $moduleName : '/' . $product->name . $moduleName; + $modules[$story->product][$story->branch] = $this->tree->getOptionMenu($story->product, 'story', 0, $story->branch); + foreach($modules[$story->product][$story->branch] as $moduleID => $moduleName) $modules[$story->product][$story->branch][$moduleID] = '/' . $product->name . $moduleName; $productPlans = $this->productplan->getPairs($story->product, $branch); } From 76bd965626014e4d66597eae33be187ba4e338d2 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 22 Nov 2021 15:16:51 +0800 Subject: [PATCH 3/3] * Modify the code. --- module/story/view/batchedit.html.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/module/story/view/batchedit.html.php b/module/story/view/batchedit.html.php index a595620fac..da93ffda30 100644 --- a/module/story/view/batchedit.html.php +++ b/module/story/view/batchedit.html.php @@ -78,8 +78,11 @@ foreach(explode(',', $showFields) as $field) foreach($branches as $branchID => $branchName) $branches[$branchID] = '/' . $product->name . '/' . $branchName; } - $modules[$story->product][$story->branch] = $this->tree->getOptionMenu($story->product, 'story', 0, $story->branch); - foreach($modules[$story->product][$story->branch] as $moduleID => $moduleName) $modules[$story->product][$story->branch][$moduleID] = '/' . $product->name . $moduleName; + if(!isset($story->product][$story->branch])) + { + $modules[$story->product][$story->branch] = $this->tree->getOptionMenu($story->product, 'story', 0, $story->branch); + foreach($modules[$story->product][$story->branch] as $moduleID => $moduleName) $modules[$story->product][$story->branch][$moduleID] = '/' . $product->name . $moduleName; + } $productPlans = $this->productplan->getPairs($story->product, $branch); }