diff --git a/module/build/control.php b/module/build/control.php
index 7dc41b3449..f323959b69 100644
--- a/module/build/control.php
+++ b/module/build/control.php
@@ -240,14 +240,14 @@ class build extends control
/* Get stories and stages. */
$storyPager = new pager($type == 'story' ? $recTotal : 0, $recPerPage, $type == 'story' ? $pageID : 1);
- $stories = $this->dao->select('*')->from(TABLE_STORY)->where('id')->in($build->stories)->andWhere('deleted')->eq(0)
- ->beginIF($type == 'story')->orderBy($orderBy)->fi()
+ $stories = $this->dao->select('t1.*, t2.stage')->from(TABLE_STORY)->alias('t1')
+ ->leftJoin(TABLE_STORYSTAGE)->alias('t2')->on('t1.id = t2.story')
+ ->where('t1.id')->in($build->stories)
+ ->andWhere('t1.deleted')->eq(0)
+ ->beginIF($type == 'story')->orderBy("t1.$orderBy")->fi()
->page($storyPager)
->fetchAll('id');
- $stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->in($build->stories)->andWhere('branch')->eq($build->branch)->fetchPairs('story', 'stage');
- foreach($stages as $storyID => $stage) $stories[$storyID]->stage = $stage;
-
/* Set menu. */
if($this->app->tab == 'project')
{
diff --git a/module/execution/control.php b/module/execution/control.php
index 4cc26205ee..726f0e8db9 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -3285,9 +3285,11 @@ class execution extends control
{
$projects = $this->project->getPairsByProgram();
$projectID = $this->project->saveState($projectID, $projects);
- $project = $this->loadModel('project')->getByID($projectID);
+ $project = $this->loadModel('project')->getByID($projectID);
$this->view->project = $project;
$this->project->setMenu($projectID);
+
+ if(!empty($project->model) and $project->model == 'kanban') return $this->locate($this->createLink('project', 'index', "projectID=$projectID"));
}
if($this->app->viewType == 'mhtml')
diff --git a/module/project/control.php b/module/project/control.php
index 52441f1177..36c8407ed7 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -482,6 +482,12 @@ class project extends control
$topProgramID = $this->program->getTopByID($programID);
+ if($model == 'kanban')
+ {
+ $this->lang->project->aclList = $this->lang->project->kanbanAclList;
+ $this->lang->project->subAclList = $this->lang->project->kanbanSubAclList;
+ }
+
$this->view->title = $this->lang->project->create;
$this->view->position[] = $this->lang->project->create;
@@ -534,7 +540,12 @@ class project extends control
$project = $this->project->getByID($projectID);
$programID = $project->parent;
$this->project->setMenu($projectID);
- if($project->model == 'kanban') unset($this->lang->project->authList['reset']);
+ if($project->model == 'kanban')
+ {
+ unset($this->lang->project->authList['reset']);
+ $this->lang->project->aclList = $this->lang->project->kanbanAclList;
+ $this->lang->project->subAclList = $this->lang->project->kanbanSubAclList;
+ }
if($_POST)
{
diff --git a/module/project/css/manageproducts.css b/module/project/css/manageproducts.css
index f7304b36c3..d2c6b619b1 100644
--- a/module/project/css/manageproducts.css
+++ b/module/project/css/manageproducts.css
@@ -7,3 +7,4 @@
#productsBox .product.has-branch > .chosen-container {position: absolute; width: 40% !important; right: 3px; top: 3px;}
#productsBox .product.has-branch > .chosen-container > .chosen-single {background: rgba(0,0,0,.05);}
#productsBox .product.has-branch > .chosen-container > .chosen-single:hover {background: #fff;}
+#productsBox .chosen-container .chosen-results{max-height: 180px;}
diff --git a/module/project/lang/en.php b/module/project/lang/en.php
index 6b7dc30d31..ba752e508f 100644
--- a/module/project/lang/en.php
+++ b/module/project/lang/en.php
@@ -243,6 +243,13 @@ $lang->project->subAclList['private'] = "Private (Only the project leader, team
$lang->project->subAclList['open'] = "Open (accessible with project view permissions)";
$lang->project->subAclList['program'] = 'Open in the program (all upper-level program team leaders and stakeholders, the project leader, team members and stakeholders can access)';
+$lang->project->kanbanAclList['private'] = 'Private (For the project leader, team members only)';
+$lang->project->kanbanAclList['open'] = "Open (accessible with project view permissions)";
+
+$lang->project->kanbanSubAclList['private'] = "Private (Only the project leader, team members can access)";
+$lang->project->kanbanSubAclList['open'] = "Open (accessible with project view permissions)";
+$lang->project->kanbanSubAclList['program'] = 'Open in the program (all upper-level program team leaders and stakeholders, the project leader, team members can access)';
+
$lang->project->authList['extend'] = 'Inherit (system privilege and project privilege)';
$lang->project->authList['reset'] = 'Reset (project privilege only)';
diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php
index b4188b6d1a..30e4c27b7f 100644
--- a/module/project/lang/zh-cn.php
+++ b/module/project/lang/zh-cn.php
@@ -243,6 +243,13 @@ $lang->project->subAclList['private'] = "私有 (只有项目负责人、团队
$lang->project->subAclList['open'] = "公开 (有项目视图权限即可访问)";
$lang->project->subAclList['program'] = '项目集内公开(所有上级项目集负责人和干系人、项目负责人、团队成员和干系人可访问)';
+$lang->project->kanbanAclList['private'] = "私有 (只有项目负责人、团队成员可访问)";
+$lang->project->kanbanAclList['open'] = "公开 (有项目视图权限即可访问)";
+
+$lang->project->kanbanSubAclList['private'] = "私有 (只有项目负责人、团队成员可访问)";
+$lang->project->kanbanSubAclList['open'] = "公开 (有项目视图权限即可访问)";
+$lang->project->kanbanSubAclList['program'] = '项目集内公开(所有上级项目集负责人和干系人、项目负责人、团队成员可访问)';
+
$lang->project->authList['extend'] = '继承 (取系统权限与项目权限的合集)';
$lang->project->authList['reset'] = '重新定义 (只取项目权限)';
diff --git a/module/project/view/manageproducts.html.php b/module/project/view/manageproducts.html.php
index 5ce5182fc3..433de3a69d 100644
--- a/module/project/view/manageproducts.html.php
+++ b/module/project/view/manageproducts.html.php
@@ -37,7 +37,7 @@
";?>
-
+
@@ -61,7 +61,7 @@
";?>
-
+
diff --git a/module/projectrelease/control.php b/module/projectrelease/control.php
index 52a46c7be9..27417936ef 100644
--- a/module/projectrelease/control.php
+++ b/module/projectrelease/control.php
@@ -225,14 +225,15 @@ class projectrelease extends control
}
$storyPager = new pager($type == 'story' ? $recTotal : 0, $recPerPage, $type == 'story' ? $pageID : 1);
- $stories = $this->dao->select('*')->from(TABLE_STORY)->where('id')->in($release->stories)->andWhere('deleted')->eq(0)
- ->beginIF($type == 'story')->orderBy($orderBy)->fi()
- ->page($storyPager)
- ->fetchAll('id');
+ $stories = $this->dao->select('t1.*, t2.stage')->from(TABLE_STORY)->alias('t1')
+ ->leftJoin(TABLE_STORYSTAGE)->alias('t2')->on('t1.id = t2.story')
+ ->where('t1.id')->in($release->stories)
+ ->andWhere('t1.deleted')->eq(0)
+ ->beginIF($type == 'story')->orderBy("t1.$orderBy")->fi()
+ ->page($storyPager)
+ ->fetchAll('id');
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story');
- $stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->in($release->stories)->andWhere('branch')->eq($release->branch)->fetchPairs('story', 'stage');
- foreach($stages as $storyID => $stage)$stories[$storyID]->stage = $stage;
$bugPager = new pager($type == 'bug' ? $recTotal : 0, $recPerPage, $type == 'bug' ? $pageID : 1);
$bugs = $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($release->bugs)->andWhere('deleted')->eq(0)
diff --git a/module/story/control.php b/module/story/control.php
index 24dea5a35c..09099b18be 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -1374,7 +1374,8 @@ class story extends control
$execution = $this->execution->getByID($this->session->execution);
if($this->app->tab == 'execution' and $execution->type == 'kanban' and $this->app->tab == 'execution')
{
- $kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
+ $this->loadModel('kanban')->updateLane($this->session->execution, 'story', $storyID);
+ $kanbanData = $this->kanban->getRDKanban($this->session->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
$kanbanData = json_encode($kanbanData);
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));