* Fix bug #31998.
This commit is contained in:
@@ -1143,7 +1143,6 @@ class story extends control
|
||||
/* Append module when change product type. */
|
||||
$moduleList = array(0 => '/');
|
||||
$productStoryList = array();
|
||||
$storyPlans = array();
|
||||
foreach($stories as $story)
|
||||
{
|
||||
if(isset($modules[$story->product][$story->branch]))
|
||||
@@ -1162,16 +1161,10 @@ class story extends control
|
||||
if(!isset($productStoryList[$story->product][$story->branch])) $productStoryList[$story->product][$story->branch] = $this->story->getProductStoryPairs($story->product, $branch, 0, 'all', 'id_desc', 0, '', $story->type);
|
||||
}
|
||||
|
||||
if(isset($plans[$story->product][$story->branch]) and zget($plans[$story->product][$story->branch], $story->plan))
|
||||
if(!empty($story->plan) and !isset($plans[$story->product][$story->branch][$story->plan]))
|
||||
{
|
||||
$storyPlans = $plans[$story->product][$story->branch];
|
||||
$planInfo = $this->dao->select('id,title,begin,end')->from(TABLE_PRODUCTPLAN)->where('id')->eq($story->plan)->fetchAll('id');
|
||||
|
||||
$storyPlans[$story->plan] = $planInfo[$story->plan]->title . ' [' . $planInfo[$story->plan]->begin . '~' . $planInfo[$story->plan]->end . ']';
|
||||
}
|
||||
else
|
||||
{
|
||||
$storyPlans = $plans;
|
||||
$plan = $this->dao->select('id,title,begin,end')->from(TABLE_PRODUCTPLAN)->where('id')->eq($story->plan)->fetch();
|
||||
$plans[$story->product][$story->branch][$story->plan] = $plan->title . ' [' . $plan->begin . '~' . $plan->end . ']';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1186,7 +1179,7 @@ class story extends control
|
||||
$this->view->branchProduct = $branchProduct;
|
||||
$this->view->storyIdList = $storyIdList;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->plans = array('' => '') + $storyPlans;
|
||||
$this->view->plans = $plans;
|
||||
$this->view->storyType = $storyType;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->executionID = $executionID;
|
||||
|
||||
@@ -85,7 +85,7 @@ foreach(explode(',', $showFields) as $field)
|
||||
<?php if(!$hiddenPlan):?>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'plan', ' hidden')?>'>
|
||||
<?php $planDisabled = $story->parent < 0 ? "disabled='disabled'" : '';?>
|
||||
<?php echo html::select("plans[$storyID]", isset($plans) ? array('' => '') + $plans : '', $story->plan, "class='form-control picker-select' data-drop-width='auto' $planDisabled");?>
|
||||
<?php echo html::select("plans[$storyID]", isset($plans[$story->product][$story->branch]) ? array('' => '') + $plans[$story->product][$story->branch] : array(), $story->plan, "class='form-control picker-select' data-drop-width='auto' $planDisabled");?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td title='<?php echo $story->title?>'>
|
||||
|
||||
Reference in New Issue
Block a user