This commit is contained in:
liuruogu
2022-09-20 07:30:32 +00:00
parent bb2e20965e
commit e461c66fc0
3 changed files with 24 additions and 16 deletions
+20 -15
View File
@@ -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();
}
+1 -1
View File
@@ -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);
+3
View File
@@ -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))
{