From 16317913686d5a817dd1ed5354dc7e87ef28bd86 Mon Sep 17 00:00:00 2001 From: liyuchun Date: Mon, 1 Nov 2021 16:54:02 +0800 Subject: [PATCH 1/2] * Fix bug #15887,#15877. --- module/execution/js/kanban.js | 2 +- module/execution/view/kanban.html.php | 7 +++++-- module/kanban/model.php | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index d8ba9373f4..5673a7c980 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -547,7 +547,7 @@ function createLaneMenu(options) var downTargetKanban = $kanban.next('.kanban').length ? $kanban.next('.kanban').data('id') : ''; var items = []; - if(priv.hasSetLane) items.push({label: kanbanLang.setLane, icon: 'edit', url: $.createLink('kanban', 'setLane', 'lane=' + lane.id + '&executionID=' + executionID), className: 'iframe'}); + if(priv.hasSetLane) items.push({label: kanbanLang.setLane, icon: 'edit', url: $.createLink('kanban', 'setLane', 'lane=' + lane.laneID + '&executionID=' + executionID), className: 'iframe'}); if(priv.hasLaneMove) items.push( {label: kanbanLang.moveUp, icon: 'arrow-up', url: $.createLink('kanban', 'laneMove', 'executionID=' + executionID + '¤tLane=' + lane.id + '&targetLane=' + upTargetKanban), className: 'iframe', disabled: !$kanban.prev('.kanban').length}, {label: kanbanLang.moveDown, icon: 'arrow-down', url: $.createLink('kanban', 'laneMove', 'executionID=' + executionID + '¤tLane=' + lane.id + '&targetLane=' + downTargetKanban), className: 'iframe', disabled: !$kanban.next('.kanban').length} diff --git a/module/execution/view/kanban.html.php b/module/execution/view/kanban.html.php index 0070919378..786577be81 100644 --- a/module/execution/view/kanban.html.php +++ b/module/execution/view/kanban.html.php @@ -64,6 +64,9 @@ $canBatchCreateStory = ($productID and common::hasPriv('story', 'batchCreate')); $canLinkStory = ($productID and common::hasPriv('execution', 'linkStory')); $canLinkStoryByPlane = ($productID and common::hasPriv('execution', 'importplanstories')); + $hasStoryButton = ($canCreateStory or $canBatchCreateStory or $canLinkStory or $canLinkStoryByPlane); + $hasTaskButton = ($canCreateTask or $canBatchCreateTask); + $hasBugButton = ($canCreateBug or $canBatchCreateBug); ?>