From e3fe57931f084518ba94f8ffb55b5386d8e2a239 Mon Sep 17 00:00:00 2001 From: Zongjun Lan Date: Thu, 24 Mar 2022 14:21:29 +0800 Subject: [PATCH 1/3] * fix bug #21088 --- module/execution/js/kanban.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index 688ce2b762..9f5b752806 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -231,13 +231,15 @@ $('.c-group').change(function() */ function createLaneMenu(options) { - var lane = options.$trigger.closest('.kanban-lane').data('lane'); + var lane = options.$trigger.closest('.kanban-lane').data('lane'); + var laneCount = options.$trigger.closest('.kanban-board').children('.kanban-lane').length; + var privs = lane.actions; if(!privs.length) return []; var items = []; if(privs.includes('setLane')) items.push({label: kanbanLang.setLane, icon: 'edit', url: createLink('kanban', 'setLane', 'laneID=' + lane.id + '&executionID=0&from=kanban'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '635px'}}); - if(privs.includes('deleteLane')) items.push({label: kanbanLang.deleteLane, icon: 'trash', url: createLink('kanban', 'deleteLane', 'lane=' + lane.id), attrs: {'target': 'hiddenwin'}}); + if(privs.includes('deleteLane') && laneCount > 1) items.push({label: kanbanLang.deleteLane, icon: 'trash', url: createLink('kanban', 'deleteLane', 'lane=' + lane.id), attrs: {'target': 'hiddenwin'}}); var bounds = options.$trigger[0].getBoundingClientRect(); items.$options = {x: bounds.right, y: bounds.top}; From a37d937d636c259f74237d049ef31794836eb546 Mon Sep 17 00:00:00 2001 From: Zongjun Lan Date: Thu, 24 Mar 2022 16:35:51 +0800 Subject: [PATCH 2/3] * fix bug #21077 --- extension/lite/group/ext/lang/resource.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extension/lite/group/ext/lang/resource.php b/extension/lite/group/ext/lang/resource.php index 442db9e851..6424f9cecb 100644 --- a/extension/lite/group/ext/lang/resource.php +++ b/extension/lite/group/ext/lang/resource.php @@ -444,6 +444,8 @@ $lang->resource->execution->unbindWhitelist = 'unbindWhitelist'; //$lang->resource->execution->storyEstimate = 'storyEstimate'; $lang->resource->execution->kanban = 'kanban'; //if($config->systemMode == 'classic') $lang->resource->project->list = 'list'; +if($config->edition != 'open') $lang->resource->execution->gantt = 'ganttchart'; +if($config->edition != 'open') $lang->resource->execution->calendar = 'calendar'; //$lang->execution->methodOrder[0] = 'index'; //if($config->systemMode == 'classic') $lang->project->methodOrder[1] = 'list'; @@ -498,6 +500,8 @@ $lang->execution->methodOrder[250] = 'addWhitelist'; $lang->execution->methodOrder[255] = 'unbindWhitelist'; $lang->execution->methodOrder[260] = 'storyEstimate'; $lang->execution->methodOrder[270] = 'kanban'; +$lang->execution->methodOrder[280] = 'gantt'; +$lang->execution->methodOrder[285] = 'calendar'; /* Task. */ $lang->resource->task = new stdclass(); From 5831ae3b29b22d3a1ad965eeda23c881d729c3b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Thu, 24 Mar 2022 16:40:28 +0800 Subject: [PATCH 3/3] * fix bug. --- module/story/control.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index d93e61e8f1..cb3ce7f235 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -51,14 +51,14 @@ class story extends control parse_str($extra, $output); if($productID == 0 and $objectID == 0) $this->locate($this->createLink('product', 'create')); - + /* Get product id according to the project id when lite vision todo transfer story */ - if($this->config->vision == 'lite' and $productID == 0) + if($this->config->vision == 'lite' and $productID == 0) { $product = $this->loadModel('product')->getProductPairsByProject($objectID); if(!empty($project)) $productID = key($product); } - + $this->story->replaceURLang($type); if($this->app->tab == 'product') { @@ -2492,7 +2492,7 @@ class story extends control $story->reviewedBy = rtrim($story->reviewedBy, ','); /* Set child story title. */ - if($story->parent > 0 && strpos($story->title, htmlentities('>'), ENT_COMPAT | ENT_HTML401, 'UTF-8') !== 0) $story->title = '>' . $story->title; + if($story->parent > 0 && strpos($story->title, htmlentities('>', ENT_COMPAT | ENT_HTML401, 'UTF-8')) !== 0) $story->title = '>' . $story->title; } if($executionID)