* Fix bug #27604.
This commit is contained in:
@@ -2552,21 +2552,26 @@ class execution extends control
|
||||
$userList['closed']->realname = 'Closed';
|
||||
$userList['closed']->avatar = '';
|
||||
|
||||
$this->view->title = $this->lang->execution->kanban;
|
||||
$this->view->realnames = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->storyOrder = $orderBy;
|
||||
$this->view->orderBy = 'id_asc';
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->productNames = $productNames;
|
||||
$this->view->productNum = count($products);
|
||||
$this->view->allPlans = $allPlans;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->kanbanGroup = $kanbanGroup;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->groupBy = $groupBy;
|
||||
$this->view->canBeChanged = $canBeChanged;
|
||||
$this->view->userList = $userList;
|
||||
$projectID = $execution->project;
|
||||
$project = $this->dao->findByID($projectID)->from(TABLE_PROJECT)->fetch();
|
||||
$hiddenPlan = $project->model !== 'scrum';
|
||||
|
||||
$this->view->title = $this->lang->execution->kanban;
|
||||
$this->view->realnames = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->storyOrder = $orderBy;
|
||||
$this->view->orderBy = 'id_asc';
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->productNames = $productNames;
|
||||
$this->view->productNum = count($products);
|
||||
$this->view->allPlans = $allPlans;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->kanbanGroup = $kanbanGroup;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->groupBy = $groupBy;
|
||||
$this->view->canBeChanged = $canBeChanged;
|
||||
$this->view->userList = $userList;
|
||||
$this->view->hiddenPlan = $hiddenPlan;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
$canCreateStory = ($productID and common::hasPriv('story', 'create'));
|
||||
$canBatchCreateStory = ($productID and common::hasPriv('story', 'batchCreate'));
|
||||
$canLinkStory = ($productID and common::hasPriv('execution', 'linkStory'));
|
||||
$canLinkStoryByPlan = ($productID and common::hasPriv('execution', 'importplanstories') and !empty($execution->hasProduct));
|
||||
$canLinkStoryByPlan = ($productID and common::hasPriv('execution', 'importplanstories') and !$hiddenPlan);
|
||||
$hasStoryButton = ($canCreateStory or $canBatchCreateStory or $canLinkStory or $canLinkStoryByPlan);
|
||||
$hasTaskButton = ($canCreateTask or $canBatchCreateTask or $canImportBug);
|
||||
$hasBugButton = ($canCreateBug or $canBatchCreateBug);
|
||||
|
||||
@@ -393,6 +393,7 @@ class story extends control
|
||||
if($this->app->tab === 'project' || $this->app->tab === 'execution')
|
||||
{
|
||||
$project = $this->dao->findById((int)$objectID)->from(TABLE_PROJECT)->fetch();
|
||||
if(!empty($project->project)) $project = $this->dao->findById((int)$project->project)->from(TABLE_PROJECT)->fetch();
|
||||
|
||||
if(empty($project->hasProduct))
|
||||
{
|
||||
@@ -502,6 +503,7 @@ class story extends control
|
||||
if(in_array($execution->type, array('project', 'kanban', 'stage'), true))
|
||||
{
|
||||
$project = $this->dao->findById((int)$executionID)->from(TABLE_PROJECT)->fetch();
|
||||
if(!empty($project->project)) $project = $this->dao->findById((int)$project->project)->from(TABLE_PROJECT)->fetch();
|
||||
|
||||
if(empty($project->hasProduct))
|
||||
{
|
||||
@@ -862,6 +864,7 @@ class story extends control
|
||||
if($this->app->tab === 'project' || $this->app->tab === 'execution')
|
||||
{
|
||||
$project = $this->dao->findById((int)$objectID)->from(TABLE_PROJECT)->fetch();
|
||||
if(!empty($project->project)) $project = $this->dao->findById((int)$project->project)->from(TABLE_PROJECT)->fetch();
|
||||
|
||||
if(empty($project->hasProduct))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user