diff --git a/module/bug/js/edit.js b/module/bug/js/edit.js
index b5895c0e65..2669cde048 100644
--- a/module/bug/js/edit.js
+++ b/module/bug/js/edit.js
@@ -1,6 +1,24 @@
$(function()
{
loadModuleRelated();
+
+ resolution = $('#resolution').val();
+ if(resolution == 'fixed')
+ {
+ $('#resolvedBuildBox').change(function()
+ {
+ if($('#resolvedBuild').val() != oldResolvedBuild)
+ {
+ confirmResult = confirm(confirmUnlinkBuild);
+ if(!confirmResult)
+ {
+ $('#resolvedBuild').val(oldResolvedBuild);
+ $('#resolvedBuild').trigger("chosen:updated");
+ $('#resolvedBuild').chosen();
+ }
+ }
+ });
+ }
});
/**
diff --git a/module/bug/lang/de.php b/module/bug/lang/de.php
index 87ad7cf382..117da8e767 100644
--- a/module/bug/lang/de.php
+++ b/module/bug/lang/de.php
@@ -181,6 +181,7 @@ $lang->bug->remindTask = 'This Bug has been converted to Task. Do you
$lang->bug->skipClose = 'Bug %s is not resolved. You cannot close it.';
$lang->bug->executionAccessDenied = "You access to the {$lang->executionCommon} to which this bug belongs is denied!";
$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->tplStep = "
[Steps]
";
diff --git a/module/bug/lang/en.php b/module/bug/lang/en.php
index 032b0d03dc..584b1c7d59 100644
--- a/module/bug/lang/en.php
+++ b/module/bug/lang/en.php
@@ -181,6 +181,7 @@ $lang->bug->remindTask = 'This bug has been converted to a task. Do y
$lang->bug->skipClose = 'Bug %s is active. You cannot close it.';
$lang->bug->executionAccessDenied = "You access to the {$lang->executionCommon} to which this bug belongs is denied!";
$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?";
/* Template. */
$lang->bug->tplStep = "[Steps]
";
diff --git a/module/bug/lang/fr.php b/module/bug/lang/fr.php
index e2c9e65dc2..569a6f9480 100644
--- a/module/bug/lang/fr.php
+++ b/module/bug/lang/fr.php
@@ -181,6 +181,7 @@ $lang->bug->remindTask = 'Ce bug a été converti en tâche. Voulez-v
$lang->bug->skipClose = 'Bug %s est actif. Vous ne pouvez pas le fermer.';
$lang->bug->executionAccessDenied = "Votre accès à {$lang->executionCommon} auquel ce bug appartient est refusé !";
$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->tplStep = "[Etape]
";
diff --git a/module/bug/lang/vi.php b/module/bug/lang/vi.php
index 8d7e8e026c..d2eeefbe24 100644
--- a/module/bug/lang/vi.php
+++ b/module/bug/lang/vi.php
@@ -181,6 +181,7 @@ $lang->bug->remindTask = 'Bug này đã chuyển thành một nhiệm
$lang->bug->skipClose = 'Bug %s được kích hoạt. Bạn không thể đóng nó.';
$lang->bug->executionAccessDenied = "Truy cập của bạn tới {$lang->executionCommon} mà Bug này sở hữu bị từ chối!";
$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?";
/* Template. */
$lang->bug->tplStep = "[Các bước]
";
diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php
index 7dfd1e848b..65fc2086d9 100644
--- a/module/bug/lang/zh-cn.php
+++ b/module/bug/lang/zh-cn.php
@@ -181,6 +181,7 @@ $lang->bug->remindTask = '该Bug已经转化为任务,是否更新
$lang->bug->skipClose = 'Bug %s 不是已解决状态,不能关闭。';
$lang->bug->executionAccessDenied = "您无权访问该Bug所属的{$lang->executionCommon}!";
$lang->bug->stepsNotEmpty = "重现步骤不能为空。";
+$lang->bug->confirmUnlinkBuild = "更换解决版本将取消与旧版本的关联,您确定取消该bug与%s的关联吗?";
/* 模板。*/
$lang->bug->tplStep = "[步骤]
";
diff --git a/module/bug/lang/zh-tw.php b/module/bug/lang/zh-tw.php
index 1d4da479e7..e84542e49d 100644
--- a/module/bug/lang/zh-tw.php
+++ b/module/bug/lang/zh-tw.php
@@ -181,6 +181,7 @@ $lang->bug->remindTask = '該Bug已經轉化為任務,是否更新
$lang->bug->skipClose = 'Bug %s 不是已解決狀態,不能關閉。';
$lang->bug->executionAccessDenied = "您無權訪問該Bug所屬的{$lang->executionCommon}!";
$lang->bug->stepsNotEmpty = "重現步驟不能為空。";
+$lang->bug->confirmUnlinkBuild = "更換解决版本將取消與舊版本的關聯,您確定取消該bug與%s的關聯嗎?";
/* 模板。*/
$lang->bug->tplStep = "[步驟]
";
diff --git a/module/bug/view/edit.html.php b/module/bug/view/edit.html.php
index f5b6844452..d32e64309d 100644
--- a/module/bug/view/edit.html.php
+++ b/module/bug/view/edit.html.php
@@ -25,6 +25,7 @@ js::set('oldTaskID' , $bug->task);
js::set('oldOpenedBuild' , $bug->openedBuild);
js::set('oldResolvedBuild' , $bug->resolvedBuild);
js::set('systemMode' , $config->systemMode);
+js::set('confirmUnlinkBuild' , sprintf($lang->bug->confirmUnlinkBuild, zget($resolvedBuilds, $bug->resolvedBuild)));
?>