From 1c8db1da3a53e942a588abb98f8497e1ae672468 Mon Sep 17 00:00:00 2001 From: sunjun Date: Wed, 1 Jun 2022 09:14:12 +0000 Subject: [PATCH] fixbug_sunjun_22531 --- module/bug/js/view.js | 5 +++++ module/bug/lang/en.php | 1 + module/bug/lang/zh-cn.php | 1 + module/bug/model.php | 2 +- module/bug/view/view.html.php | 1 + module/story/view/create.html.php | 2 +- 6 files changed, 10 insertions(+), 2 deletions(-) diff --git a/module/bug/js/view.js b/module/bug/js/view.js index 0fa36f3851..a5038e130c 100644 --- a/module/bug/js/view.js +++ b/module/bug/js/view.js @@ -2,3 +2,8 @@ $(document).ready(function() { limitIframeLevel(); }); + +$('#tostory').click(function() +{ + if(!confirm(confrimToStory)) return false; +}); diff --git a/module/bug/lang/en.php b/module/bug/lang/en.php index 7647b31a3b..d8d7c8fd71 100644 --- a/module/bug/lang/en.php +++ b/module/bug/lang/en.php @@ -208,6 +208,7 @@ $lang->bug->executionAccessDenied = "You access to the {$lang->executionCommon} $lang->bug->stepsNotEmpty = "The reproduction step cannot be empty."; $lang->bug->confirmUnlinkBuild = "Replacing the solution version will disassociate the bug from the old version. Are you sure you want to disassociate the bug from %s?"; $lang->bug->noSwitchBranch = 'The linked module of Bug%s is not in the current branch. It will be omitted.'; +$lang->bug->confirmToStory = 'The bug will be closed automatically after transferring to requirements, and the reason for closing is that the bug has been converted to requirements status.'; /* Template. */ $lang->bug->tplStep = "

[Steps]


"; diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php index 279caed209..c61ed60d23 100644 --- a/module/bug/lang/zh-cn.php +++ b/module/bug/lang/zh-cn.php @@ -208,6 +208,7 @@ $lang->bug->executionAccessDenied = "您无权访问该Bug所属的{$lang->execu $lang->bug->stepsNotEmpty = "重现步骤不能为空。"; $lang->bug->confirmUnlinkBuild = "更换解决版本将取消与旧版本的关联,您确定取消该bug与%s的关联吗?"; $lang->bug->noSwitchBranch = 'Bug%s所属模块不在当前分支下,将自动忽略。'; +$lang->bug->confirmToStory = '转需求后Bug将自动关闭,关闭原因为转为需求。'; /* 模板。*/ $lang->bug->tplStep = "

[步骤]


"; diff --git a/module/bug/model.php b/module/bug/model.php index bca58307c3..de5edeb1bf 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -3328,7 +3328,7 @@ class bugModel extends model if($type == 'view') $menu .= $this->buildMenu('bug', 'activate', $params, $bug, $type, '', '', "text-success iframe showinonlybody", true); if($type == 'view' && $this->app->tab != 'product') { - $menu .= $this->buildMenu('bug', 'toStory', $toStoryParams, $bug, $type, $this->lang->icons['story'], '', '', '', "data-app='qa'", $this->lang->bug->toStory); + $menu .= $this->buildMenu('bug', 'toStory', $toStoryParams, $bug, $type, $this->lang->icons['story'], '', '', '', "data-app='product' id='tostory'", $this->lang->bug->toStory); $menu .= $this->buildMenu('bug', 'createCase', $convertParams, $bug, $type, 'sitemap'); } if($type == 'view') diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index 1d52f7da9c..97c6003ba1 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -13,6 +13,7 @@ +bug->confirmToStory);?> session->bugList ? $app->session->bugList : inlink('browse', "productID=$bug->product");?>