From aae63736d36e99a23b8967914a94a834aef6eefa Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 17 Feb 2022 15:05:22 +0800 Subject: [PATCH] *Finish task #49307. --- module/story/control.php | 7 +++++-- module/story/view/batchedit.html.php | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index 39c5db8eb8..317171157f 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -832,8 +832,11 @@ class story extends control foreach($branchList as $branchInfo) $branches[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : ''); $branchTagOption[$linkedProduct->id] = array(BRANCH_MAIN => $this->lang->branch->main) + $branches; - $modules[$linkedProduct->id] = $this->tree->getOptionMenu($linkedProduct->id, 'story', 0, array_keys($branchList)); - $plans[$linkedProduct->id] = $this->productplan->getBranchPlanPairs($linkedProduct->id, array_keys($branchList), true); + + $moduleList = $this->tree->getOptionMenu($linkedProduct->id, 'story', 0, array_keys($branchList)); + $modules[$linkedProduct->id] = $linkedProduct->type != 'normal' ? $moduleList : array(0 => $moduleList); + + $plans[$linkedProduct->id] = $this->productplan->getBranchPlanPairs($linkedProduct->id, array_keys($branchList), true); if(empty($plans[$linkedProduct->id])) $plans[$linkedProduct->id][0] = $plans[$linkedProduct->id]; if($linkedProduct->type != 'normal') $branchProduct = true; diff --git a/module/story/view/batchedit.html.php b/module/story/view/batchedit.html.php index 8f558508cb..eddc905b92 100644 --- a/module/story/view/batchedit.html.php +++ b/module/story/view/batchedit.html.php @@ -77,7 +77,7 @@ foreach(explode(',', $showFields) as $field) '> - product]->type == 'normal' ? (isset($modules[$story->product][$story->module])?$modules[$story->product][$story->module] : array('0' => '/')) : (isset($modules[$story->product][$story->branch][$story->module]) ? $modules[$story->product][$story->branch][$story->module] : array('0' => '/')), $story->module, "class='form-control chosen'");?> + product][$story->branch]) ? $modules[$story->product][$story->branch] : array('0' => '/'), $story->module, "class='form-control chosen'");?> '> product][$story->branch]) ? array('' => '') + $plans[$story->product][$story->branch] : '', $story->plan, "class='form-control chosen'");?>