|
diff --git a/module/doc/control.php b/module/doc/control.php
index 9f6a58abb5..46b0872f57 100755
--- a/module/doc/control.php
+++ b/module/doc/control.php
@@ -871,9 +871,9 @@ class doc extends control
if($doclib->acl == 'custom')
{
- return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control"));
+ return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control'"));
}
- if($doclib->acl == 'open') return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control"));
+ if($doclib->acl == 'open') return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control'"));
if($doclib->acl == 'private') echo 'private';
if($doclib->acl == 'default') echo 'default';
return false;
diff --git a/module/execution/control.php b/module/execution/control.php
index 16bcba9dba..d215edae8c 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -871,6 +871,21 @@ class execution extends control
$this->display();
}
+ /**
+ * View a story.
+ *
+ * @param int $storyID
+ * @access public
+ * @return void
+ */
+ public function storyView($storyID)
+ {
+ $this->session->set('productList', $this->app->getURI(true), 'product');
+
+ $story = $this->loadModel('story')->getByID($storyID);
+ echo $this->fetch('story', 'view', "storyID=$storyID&version=$story->version¶m=" . $this->session->execution);
+ }
+
/**
* Browse bugs of a execution.
*
diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js
index 9d1c806453..4ee4827f82 100644
--- a/module/execution/js/kanban.js
+++ b/module/execution/js/kanban.js
@@ -501,7 +501,7 @@ function renderStoryItem(item, $item, col)
if(!$title.length)
{
$title = $('' + (scaleSize <= 1 ? ' ' : '') + '')
- .attr('href', $.createLink('story', 'view', 'storyID=' + item.id + '&version=0¶m=' + execution.id, '', true)).attr('data-toggle', 'modal').attr('data-width', '95%');
+ .attr('href', $.createLink('execution', 'storyView', 'storyID=' + item.id + '&version=0¶m=' + execution.id, '', true)).attr('data-toggle', 'modal').attr('data-width', '95%');
$title.appendTo($item);
}
var title = rdSearchValue != '' ? "" + item.title.replaceAll(rdSearchValue, "" + rdSearchValue + "") + "": "" + item.title + "";
diff --git a/module/execution/js/taskkanban.js b/module/execution/js/taskkanban.js
index 8af14dd812..6b6db71515 100644
--- a/module/execution/js/taskkanban.js
+++ b/module/execution/js/taskkanban.js
@@ -123,7 +123,7 @@ function renderStoryItem(item, $item, col)
if(!$title.length)
{
$title = $('' + (scaleSize <= 1 ? ' ' : '') + '')
- .attr('href', $.createLink('story', 'view', 'storyID=' + item.id, '', true));
+ .attr('href', $.createLink('execution', 'storyView', 'storyID=' + item.id, '', true));
$title.appendTo($item);
}
var title = searchValue != '' ? "" + item.title.replaceAll(searchValue, "" + searchValue + "") + "": "" + item.title + "";
diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php
index 346944a2a3..d87227b271 100644
--- a/module/execution/lang/en.php
+++ b/module/execution/lang/en.php
@@ -94,6 +94,7 @@ $lang->execution->viewBug = 'Bugs';
$lang->execution->noProduct = "No {$lang->productCommon} yet.";
$lang->execution->createStory = "Create Story";
$lang->execution->storyTitle = "Story Name";
+$lang->execution->storyView = "Story Detail";
$lang->execution->all = "All {$lang->executionCommon}s";
$lang->execution->undone = 'Unfinished ';
$lang->execution->unclosed = 'Unclosed';
diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php
index 83fd91a0b4..11bc75b2a4 100644
--- a/module/execution/lang/zh-cn.php
+++ b/module/execution/lang/zh-cn.php
@@ -94,6 +94,7 @@ $lang->execution->viewBug = '查看bug';
$lang->execution->noProduct = "无{$lang->executionCommon}";
$lang->execution->createStory = "提{$lang->SRCommon}";
$lang->execution->storyTitle = "{$lang->SRCommon}名称";
+$lang->execution->storyView = "{$lang->SRCommon}详情";
$lang->execution->all = '所有';
$lang->execution->undone = '未完成';
$lang->execution->unclosed = '未关闭';
diff --git a/module/execution/model.php b/module/execution/model.php
index ad8cf6b43e..472d562746 100644
--- a/module/execution/model.php
+++ b/module/execution/model.php
@@ -3848,7 +3848,7 @@ class executionModel extends model
$storyItem->storyId = $story->id;
$storyItem->openedBy = zget($users, $story->openedBy);
$storyItem->assignedTo = zget($users, $story->assignedTo);
- $storyItem->url = helper::createLink('story', 'view', "storyID=$story->id&version=$story->version&from=execution¶m=$executionID");
+ $storyItem->url = helper::createLink('execution', 'storyView', "storyID=$story->id&version=$story->version&from=execution¶m=$executionID");
$storyItem->taskCreateUrl = helper::createLink('task', 'batchCreate', "executionID={$executionID}&story={$story->id}");
$storyTasks = isset($taskGroups[$node->id][$story->id]) ? $taskGroups[$node->id][$story->id] : array();
@@ -3984,18 +3984,15 @@ class executionModel extends model
->where('product')->in(array_keys($products))
->andWhere('deleted')->eq(0)
->andWhere('branch')->in($branchIdList)->fi()
- ->beginIF(strpos($param, 'skipparent') !== false)->andWhere('parent')->ne(-1)->fi()
->orderBy('begin desc')
->fetchAll('id');
$plans = $this->productplan->reorder4Children($plans);
$productPlans = array();
- $parentTitle = array();
foreach($plans as $plan)
{
- if($plan->parent == '-1') $parentTitle[$plan->id] = $plan->title;
- if($plan->parent > 0 and isset($parentTitle[$plan->parent])) $plan->title = $parentTitle[$plan->parent] . ' /' . $plan->title;
-
+ if($plan->parent == '-1' and strpos($param, 'skipparent') !== false) continue;
+ if($plan->parent > 0 and isset($plans[$plan->parent])) $plan->title = $plans[$plan->parent]->title . ' /' . $plan->title;
$productPlans[$plan->product][$plan->id] = $plan->title . " [{$plan->begin} ~ {$plan->end}]";
if($plan->begin == '2030-01-01' and $plan->end == '2030-01-01') $productPlans[$plan->product][$plan->id] = $plan->title . ' ' . $this->lang->productplan->future;
}
diff --git a/module/execution/view/importtask.html.php b/module/execution/view/importtask.html.php
index c6ee908989..95404c7cbc 100644
--- a/module/execution/view/importtask.html.php
+++ b/module/execution/view/importtask.html.php
@@ -69,9 +69,9 @@
storyID)
{
- if(common::hasPriv('story', 'view'))
+ if(common::hasPriv('execution', 'storyView'))
{
- echo html::a($this->createLink('story', 'view', "storyid=$task->storyID"), $task->storyTitle, '', "class='preview'", true, isonlybody());
+ echo html::a($this->createLink('execution', 'storyView', "storyid=$task->storyID"), $task->storyTitle, '', "class='preview'", true, isonlybody());
}
else
{
diff --git a/module/execution/view/linkstory.html.php b/module/execution/view/linkstory.html.php
index a95462dfd7..cf48937571 100644
--- a/module/execution/view/linkstory.html.php
+++ b/module/execution/view/linkstory.html.php
@@ -55,7 +55,7 @@
|