* Fix bug #27808.
This commit is contained in:
+47
-26
@@ -1327,6 +1327,24 @@ class story extends control
|
||||
$this->product->setMenu($story->product, $story->branch);
|
||||
}
|
||||
|
||||
$this->view->hiddenPlan = false;
|
||||
$this->view->hiddenURS = false;
|
||||
if(!empty($product->shadow))
|
||||
{
|
||||
$projectID = $this->dao->select('project')->from(TABLE_PROJECTPRODUCT)->where('product')->eq($product->id)->fetch('project');
|
||||
$project = $this->dao->findById($projectID)->from(TABLE_PROJECT)->fetch();
|
||||
|
||||
if($project->model === 'waterfall')
|
||||
{
|
||||
$this->view->hiddenPlan = true;
|
||||
}
|
||||
elseif($project->model === 'kanban')
|
||||
{
|
||||
$this->view->hiddenPlan = true;
|
||||
$this->view->hiddenURS = true;
|
||||
}
|
||||
}
|
||||
|
||||
if($product->type != 'normal') $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]);
|
||||
|
||||
$reviewers = $this->story->getReviewerPairs($storyID, $story->version);
|
||||
@@ -1339,32 +1357,35 @@ class story extends control
|
||||
$position[] = $this->lang->story->common;
|
||||
$position[] = $this->lang->story->view;
|
||||
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->product = $product;
|
||||
$this->view->branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($product->id);
|
||||
$this->view->plan = $plan;
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->fromBug = $fromBug;
|
||||
$this->view->cases = $cases;
|
||||
$this->view->story = $story;
|
||||
$this->view->linkedMRs = $linkedMRs;
|
||||
$this->view->track = $this->story->getTrackByID($story->id);
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->reviewers = $reviewers;
|
||||
$this->view->relations = $this->story->getStoryRelation($story->id, $story->type);
|
||||
$this->view->executions = $this->execution->getPairs(0, 'all', 'nocode');
|
||||
$this->view->execution = empty($story->execution) ? array() : $this->dao->findById($story->execution)->from(TABLE_EXECUTION)->fetch();
|
||||
$this->view->actions = $this->action->getList('story', $storyID);
|
||||
$this->view->storyModule = $storyModule;
|
||||
$this->view->modulePath = $modulePath;
|
||||
$this->view->storyProducts = $storyProducts;
|
||||
$this->view->version = $version;
|
||||
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('story', $storyID);
|
||||
$this->view->from = $from;
|
||||
$this->view->param = $param;
|
||||
$this->view->builds = $this->loadModel('build')->getStoryBuilds($storyID);
|
||||
$this->view->releases = $this->loadModel('release')->getStoryReleases($storyID);
|
||||
$execution = empty($story->execution) ? array() : $this->dao->findById($story->execution)->from(TABLE_EXECUTION)->fetch();
|
||||
$project = empty($execution->project) ? $execution : $this->dao->findById($execution->project)->from(TABLE_PROJECT)->fetch();
|
||||
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->product = $product;
|
||||
$this->view->branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($product->id);
|
||||
$this->view->plan = $plan;
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->fromBug = $fromBug;
|
||||
$this->view->cases = $cases;
|
||||
$this->view->story = $story;
|
||||
$this->view->linkedMRs = $linkedMRs;
|
||||
$this->view->track = $this->story->getTrackByID($story->id);
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->reviewers = $reviewers;
|
||||
$this->view->relations = $this->story->getStoryRelation($story->id, $story->type);
|
||||
$this->view->executions = $this->execution->getPairs(0, 'all', 'nocode');
|
||||
$this->view->execution = $execution;
|
||||
$this->view->actions = $this->action->getList('story', $storyID);
|
||||
$this->view->storyModule = $storyModule;
|
||||
$this->view->modulePath = $modulePath;
|
||||
$this->view->storyProducts = $storyProducts;
|
||||
$this->view->version = $version;
|
||||
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('story', $storyID);
|
||||
$this->view->from = $from;
|
||||
$this->view->param = $param;
|
||||
$this->view->builds = $this->loadModel('build')->getStoryBuilds($storyID);
|
||||
$this->view->releases = $this->loadModel('release')->getStoryReleases($storyID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
?>
|
||||
<td title='<?php echo $moduleTitle?>'><?php echo $printModule?></td>
|
||||
</tr>
|
||||
<?php if($story->type != 'requirement' and $story->parent != -1 and empty($product->shadow)):?>
|
||||
<?php if($story->type != 'requirement' and $story->parent != -1 and !$hiddenPlan):?>
|
||||
<tr class='plan-line'>
|
||||
<th><?php echo $lang->story->plan;?></th>
|
||||
<td>
|
||||
@@ -414,16 +414,16 @@
|
||||
<div class="cell">
|
||||
<div class='tabs'>
|
||||
<ul class='nav nav-tabs'>
|
||||
<?php if($this->config->URAndSR && empty($product->shadow)):?>
|
||||
<?php if($this->config->URAndSR && !$hiddenURS):?>
|
||||
<li class='active'><a href='#legendStories' data-toggle='tab'><?php echo $story->type == 'story' ? $lang->story->requirement : $lang->story->story;?></a></li>
|
||||
<?php endif;?>
|
||||
<?php if($story->type == 'story'):?>
|
||||
<li class="<?php if(!$this->config->URAndSR || !empty($product->shadow)) echo 'active';?>"><a href='#legendProjectAndTask' data-toggle='tab'><?php echo $lang->story->legendProjectAndTask;?></a></li>
|
||||
<li class="<?php if(!$this->config->URAndSR || $hiddenURS) echo 'active';?>"><a href='#legendProjectAndTask' data-toggle='tab'><?php echo $lang->story->legendProjectAndTask;?></a></li>
|
||||
<?php endif;?>
|
||||
<li><a href='#legendRelated' data-toggle='tab'><?php echo $lang->story->legendRelated;?></a></li>
|
||||
</ul>
|
||||
<div class='tab-content'>
|
||||
<?php if($this->config->URAndSR && empty($product->shadow)):?>
|
||||
<?php if($this->config->URAndSR && !$hiddenURS):?>
|
||||
<div class='tab-pane active' id='legendStories'>
|
||||
<ul class="list-unstyled">
|
||||
<?php
|
||||
@@ -445,7 +445,7 @@
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($story->type == 'story'):?>
|
||||
<div class="tab-pane <?php if(!$this->config->URAndSR || !empty($product->shadow)) echo 'active';?>" id='legendProjectAndTask'>
|
||||
<div class="tab-pane <?php if(!$this->config->URAndSR || $hiddenURS) echo 'active';?>" id='legendProjectAndTask'>
|
||||
<ul class="list-unstyled">
|
||||
<?php
|
||||
foreach($story->tasks as $executionTasks)
|
||||
|
||||
Reference in New Issue
Block a user