This commit is contained in:
zhujinyong
2023-02-24 10:25:57 +08:00
parent 9e73c11871
commit d0ab2da0d1
4 changed files with 91 additions and 68 deletions
+14 -4
View File
@@ -2615,10 +2615,18 @@ class execution extends control
$execution = $this->commonAction($executionID);
if($execution->type != 'kanban') return print(js::locate(inlink('view', "executionID=$executionID")));
if($execution->lifetime == 'ops' or in_array($execution->attribute, array('request', 'review')))
$features = $this->execution->getExecutionFeatures($execution);
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $browseType, $orderBy, 0, $groupBy);
/* Remove lanes if no feature. */
foreach($kanbanData as $regionID => $region)
{
$browseType = 'task';
unset($this->lang->kanban->group->task['story']);
foreach($region->groups as $groupID => $group)
{
if(!$features['story'] and $group->lanes[0]->type == 'story') unset($kanbanData[$regionID]->groups[$groupID]);
if(!$features['qa'] and $group->lanes[0]->type == 'bug') unset($kanbanData[$regionID]->groups[$groupID]);
$kanbanData[$regionID]->groups = array_values($kanbanData[$regionID]->groups);
}
}
/* Set Session. */
@@ -2688,6 +2696,7 @@ class execution extends control
$this->view->projectID = $projectID;
$this->view->project = $this->loadModel('project')->getByID($projectID);
$this->view->allPlans = $allPlans;
$this->view->features = $features;
$this->view->kanbanData = $kanbanData;
$this->view->executionActions = $executionActions;
$this->view->kanban = $this->lang->execution->kanban;
@@ -2744,7 +2753,7 @@ class execution extends control
/* Show lanes of the attribute: no story&bug in request, no bug in design. */
if(!isset($this->lang->execution->menu->story)) unset($kanbanGroup['story']);
if(!isset($this->lang->execution->menu->qa)) unset($kanbanGroup['bug']);
if(!isset($this->lang->execution->menu->qa)) unset($kanbanGroup['bug']);
/* Determines whether an object is editable. */
$canBeChanged = common::canModify('execution', $execution);
@@ -2783,6 +2792,7 @@ class execution extends control
$this->view->productNum = count($products);
$this->view->allPlans = $allPlans;
$this->view->browseType = $browseType;
$this->view->features = $this->execution->getExecutionFeatures($execution);
$this->view->kanbanGroup = $kanbanGroup;
$this->view->execution = $execution;
$this->view->groupBy = $groupBy;