* Fix a bug.

This commit is contained in:
hufangzhou
2021-01-20 10:27:24 +08:00
parent 76baef16c0
commit e774abce77
2 changed files with 2 additions and 7 deletions
+1 -6
View File
@@ -199,11 +199,6 @@ class product extends control
{
$products = $this->product->getProductsByProject($this->session->PRJ);
$productPlans = $this->loadModel('project')->getPlans($products);
$allPlans = array();
foreach($productPlans as $productPlan)
{
foreach($productPlan as $id => $plan) $allPlans[$id] = $plan;
}
if($projectStoryBrowseType == 'bybranch') $param = $branch;
$stories = $this->story->getProjectStories($this->session->PRJ, $sort, $projectStoryBrowseType, $param, 'story', '', $pager, $productID, $branch);
@@ -254,7 +249,7 @@ class product extends control
$this->view->moduleID = $moduleID;
$this->view->stories = $stories;
$this->view->plans = $this->loadModel('productplan')->getPairs($productID, $branch, '', true);
$this->view->allPlans = isset($allPlans) ? $allPlans : array();
$this->view->productPlans = isset($productPlans) ? $productPlans : array();
$this->view->summary = $this->product->summary($stories, $storyType);
$this->view->moduleTree = $moduleTree;
$this->view->parentModules = $this->tree->getParents($moduleID);
+1 -1
View File
@@ -455,7 +455,7 @@ $lang->story->createCommon = $storyType == 'story' ? $lang->story->createStory :
</div>
<div class="modal-body">
<div class='input-group'>
<?php echo html::select('plan', $allPlans, '', "class='form-control chosen' id='plan'");?>
<?php echo html::select('plan', $productPlans[$productID], '', "class='form-control chosen' id='plan'");?>
<span class='input-group-btn'><?php echo html::commonButton($lang->project->linkStory, "id='toTaskButton'", 'btn btn-primary');?></span>
</div>
</div>