From ecf749b7da013b61afa0566314cde170e2069b31 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Tue, 29 Mar 2022 16:59:33 +0800 Subject: [PATCH 1/6] * Fix bug #18002. --- module/execution/control.php | 12 +++++++++++- module/execution/view/task.html.php | 12 +++++++----- module/execution/view/taskkanban.html.php | 22 +++++++++++++++++----- 3 files changed, 35 insertions(+), 11 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index d4ef2cbb54..83d8747b15 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2131,6 +2131,7 @@ class execution extends control */ public function taskKanban($executionID, $browseType = '', $orderBy = 'order_asc', $groupBy = '') { + $execution = $this->loadModel('execution')->getById($executionID); if(empty($browseType)) $browseType = $this->session->kanbanType ? $this->session->kanbanType : 'all'; if(empty($groupBy)) $groupBy = 'default'; @@ -2148,7 +2149,16 @@ class execution extends control /* Compatibility IE8. */ if(strpos($this->server->http_user_agent, 'MSIE 8.0') !== false) header("X-UA-Compatible: IE=EmulateIE7"); - $kanbanGroup = $this->loadModel('kanban')->getExecutionKanban($executionID, $browseType, $groupBy); + if($execution->lifetime == 'ops') + { + unset($this->lang->kanban->type['story']); + unset($this->lang->kanban->type['bug']); + $kanbanGroup = $this->loadModel('kanban')->getExecutionKanban($executionID, 'task', $groupBy); + } + else + { + $kanbanGroup = $this->loadModel('kanban')->getExecutionKanban($executionID, $browseType, $groupBy); + } if(empty($kanbanGroup)) { $this->kanban->createExecutionLane($executionID, $browseType, $groupBy); diff --git a/module/execution/view/task.html.php b/module/execution/view/task.html.php index 1681e153bc..bf0aa62c49 100644 --- a/module/execution/view/task.html.php +++ b/module/execution/view/task.html.php @@ -132,11 +132,13 @@ body {margin-bottom: 25px;} $misc = common::hasPriv('execution', 'importTask') ? "class='import'" : "class=disabled"; $link = common::hasPriv('execution', 'importTask') ? $this->createLink('execution', 'importTask', "execution=$execution->id") : '#'; echo "
  • " . html::a($link, $lang->execution->importTask, '', $misc) . "
  • "; - - $class = common::hasPriv('execution', 'importBug') ? '' : "class=disabled"; - $misc = common::hasPriv('execution', 'importBug') ? "class='import'" : "class=disabled"; - $link = common::hasPriv('execution', 'importBug') ? $this->createLink('execution', 'importBug', "execution=$execution->id") : '#'; - echo "
  • " . html::a($link, $lang->execution->importBug, '', $misc) . "
  • "; + if($execution->lifetime != 'ops') + { + $class = common::hasPriv('execution', 'importBug') ? '' : "class=disabled"; + $misc = common::hasPriv('execution', 'importBug') ? "class='import'" : "class=disabled"; + $link = common::hasPriv('execution', 'importBug') ? $this->createLink('execution', 'importBug', "execution=$execution->id") : '#'; + echo "
  • " . html::a($link, $lang->execution->importBug, '', $misc) . "
  • "; + } ?> diff --git a/module/execution/view/taskkanban.html.php b/module/execution/view/taskkanban.html.php index 0c16c7506e..86e9009b3e 100644 --- a/module/execution/view/taskkanban.html.php +++ b/module/execution/view/taskkanban.html.php @@ -13,7 +13,14 @@