From 6534d1b7efbe7f5f468151a77fb7991c4cfa59ac Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Tue, 15 Nov 2022 10:27:50 +0800 Subject: [PATCH] * Fix bug#29531. --- module/execution/view/kanban.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/execution/view/kanban.html.php b/module/execution/view/kanban.html.php index c51bd5fcdd..7c036b443d 100644 --- a/module/execution/view/kanban.html.php +++ b/module/execution/view/kanban.html.php @@ -74,7 +74,7 @@ $canBatchCreateBug = ($productID and common::hasPriv('bug', 'batchCreate') and $canImportBug = ($productID and common::hasPriv('execution', 'importBug')); $canCreateStory = ($productID and common::hasPriv('story', 'create')); $canBatchCreateStory = ($productID and common::hasPriv('story', 'batchCreate')); -$canLinkStory = ($productID and common::hasPriv('execution', 'linkStory')); +$canLinkStory = ($productID and common::hasPriv('execution', 'linkStory') and !empty($execution->hasProduct)); $canLinkStoryByPlan = ($productID and common::hasPriv('execution', 'importplanstories') and !empty($project->hasProduct)); $hasStoryButton = ($canCreateStory or $canBatchCreateStory or $canLinkStory or $canLinkStoryByPlan); $hasTaskButton = ($canCreateTask or $canBatchCreateTask or $canImportBug);