This commit is contained in:
liumengyi
2023-02-09 15:00:37 +08:00
parent 54748bc377
commit 504b9d8a4d
2 changed files with 5 additions and 12 deletions
+4 -11
View File
@@ -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;
+1 -1
View File
@@ -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?>'>