From 7ee396c45ba89986ca6af2d30ef4e8506d7d4e51 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 12 Sep 2024 15:55:27 +0800 Subject: [PATCH] * [bug#55224,done,0.5h] Requirements without a product project do not display the remove button. --- module/execution/js/storykanban.ui.js | 2 +- module/execution/ui/storykanban.html.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/execution/js/storykanban.ui.js b/module/execution/js/storykanban.ui.js index f69ce8cd41..329f4e5d47 100644 --- a/module/execution/js/storykanban.ui.js +++ b/module/execution/js/storykanban.ui.js @@ -8,7 +8,7 @@ window.getItem = function(info) } const unlinkUrl = $.createLink('execution', 'unlinkStory', `executionID=${executionID}&story=${info.item.id}`); - const unlinkBtn = ``; + const unlinkBtn = priv.canUnlinkStory ? `` : ''; const content = `
${info.item.pri} diff --git a/module/execution/ui/storykanban.html.php b/module/execution/ui/storykanban.html.php index 7eac7a91eb..e0c5333653 100644 --- a/module/execution/ui/storykanban.html.php +++ b/module/execution/ui/storykanban.html.php @@ -18,7 +18,7 @@ jsVar('hourUnit', $config->hourUnit); jsVar('executionID', $executionID); jsVar('priv', array( 'canViewStory' => common::hasPriv('execution', 'storyView'), - 'canUnlinkStory' => common::hasPriv('execution', 'unlinkStory'), + 'canUnlinkStory' => (common::hasPriv('execution', 'unlinkStory') && $execution->hasProduct), 'canBatchChangeStage' => common::hasPriv('story', 'batchChangeStage') ));