diff --git a/module/doc/control.php b/module/doc/control.php
index e7c49e3735..d55b8bdb63 100755
--- a/module/doc/control.php
+++ b/module/doc/control.php
@@ -173,7 +173,7 @@ class doc extends control
$this->view->users = $this->loadModel('user')->getPairs('noletter|pofirst|nodeleted');
$this->view->blockID = $blockID;
- if($type == 'productStory' || $type == 'ER' || $type == 'UR') $this->docZen->assignStoryGradeData($type);
+ if(strpos(',productStory,ER,UR,planStory,', $type) !== false) $this->docZen->assignStoryGradeData($type);
$this->display();
}
diff --git a/module/doc/js/zentaolist.ui.js b/module/doc/js/zentaolist.ui.js
index 92877847b0..6b8f88ec05 100644
--- a/module/doc/js/zentaolist.ui.js
+++ b/module/doc/js/zentaolist.ui.js
@@ -176,30 +176,35 @@ function changeProduct()
window.renderCell = function(result, info)
{
- if(blockType == 'productStory' || blockType == 'ER' || blockType == 'UR')
+ console.log(blockType);
+ if(['productStory', 'ER', 'UR', 'planStory'].indexOf(blockType) !== -1)
{
if(info.col.name == 'title' && result)
{
const story = info.row.data;
let html = '';
- let gradeLabel = '';
- let showGrade = false;
- const gradeMap = gradeGroup[story.type] || {};
+ if(blockType == 'planStory')
+ {
+ let gradeLabel = gradeGroup[story.type][story.grade];
+ if(gradeLabel) html += "" + gradeLabel + " ";
+ }
+ else
+ {
+ let gradeLabel = '';
+ let showGrade = false;
+ const gradeMap = gradeGroup[story.type] || {};
- if(story.type != storyType) showGrade = true;
- if((story.type == 'epic' || story.type == 'requirement') && Object.keys(gradeMap).length >= 2) showGrade = true;
- if(story.type == 'story' && Object.keys(gradeMap).length >= 3) showGrade = true;
- if(story.grade > 1) showGrade = true;
+ if(story.type != storyType) showGrade = true;
+ if((story.type == 'epic' || story.type == 'requirement') && Object.keys(gradeMap).length >= 2) showGrade = true;
+ if(story.type == 'story' && Object.keys(gradeMap).length >= 3) showGrade = true;
+ if(story.grade > 1) showGrade = true;
- if(showGrade) gradeLabel = gradeMap[story.grade];
- if(gradeLabel) html += "" + gradeLabel + " ";
+ if(showGrade) gradeLabel = gradeMap[story.grade];
+ if(gradeLabel) html += "" + gradeLabel + " ";
- if(story.color) result[0].props.style = 'color: ' + story.color;
-
- if((story.type == 'story' && !storyViewPriv) ||
- (story.type == 'requirement' && !requirementViewPriv) ||
- (story.type == 'epic' && !epicViewPriv)) result[0] = result[0].props.children;
+ if(story.color) result[0].props.style = 'color: ' + story.color;
+ }
if(html) result.unshift({html});
}
diff --git a/module/doc/ui/zentaolist.html.php b/module/doc/ui/zentaolist.html.php
index c29010c4ce..5534e6d785 100644
--- a/module/doc/ui/zentaolist.html.php
+++ b/module/doc/ui/zentaolist.html.php
@@ -11,14 +11,10 @@ declare(strict_types=1);
namespace zin;
jsVar('blockType', $type);
-if($type == 'productStory' || $type == 'ER' || $type == 'UR')
+if(strpos(',productStory,ER,UR,planStory,',",{$type},") !== false)
{
jsVar('gradeGroup', $gradeGroup);
- jsVar('oldShowGrades', $showGrades);
- jsVar('storyType', $storyType);
- jsVar('storyViewPriv', hasPriv('story', 'view'));
- jsVar('requirementViewPriv', hasPriv('requirement', 'view'));
- jsVar('epicViewPriv', hasPriv('epic', 'view'));
+ if($type != 'planStory') jsVar('storyType', $storyType);
}
$actions = array();
diff --git a/module/doc/zen.php b/module/doc/zen.php
index f809f44503..e272807c3f 100644
--- a/module/doc/zen.php
+++ b/module/doc/zen.php
@@ -1633,15 +1633,14 @@ class docZen extends doc
$gradeList = $this->loadModel('story')->getGradeList('');
foreach($gradeList as $grade) $gradeGroup[$grade->type][$grade->grade] = $grade->name;
- if($type == 'productStory') $storyType = 'story';
- if($type == 'ER') $storyType = 'epic';
- if($type == 'UR') $storyType = 'requirement';
- if($storyType != 'story')$this->loadModel($storyType);
-
- $gradeMenu = $this->story->getGradeMenu($storyType);
+ if($type != 'planStory')
+ {
+ if($type == 'productStory') $storyType = 'story';
+ if($type == 'ER') $storyType = 'epic';
+ if($type == 'UR') $storyType = 'requirement';
+ $this->view->storyType = $storyType;
+ }
$this->view->gradeGroup = $gradeGroup;
- $this->view->storyType = $storyType;
- $this->view->showGrades = !empty($this->config->{$storyType}->showGrades) ? $this->config->{$storyType}->showGrades : $this->story->getDefaultShowGrades($gradeMenu);
}
}