aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-03-10 10:31:46 +0100
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-03-10 10:31:46 +0100
commit58563de4fce50481eee4ffeaccf536c8388bf12e (patch)
treeb9421ac51d930c5b8a85d0303346b8945d614eb2 /sonar-server/src
parentf715a2cc8f6702b5f4fc226bd95162df8c9bf58a (diff)
downloadsonarqube-58563de4fce50481eee4ffeaccf536c8388bf12e.tar.gz
sonarqube-58563de4fce50481eee4ffeaccf536c8388bf12e.zip
SONAR-5091 Fix display issue when duplicating default QG
Diffstat (limited to 'sonar-server/src')
-rw-r--r--sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-header-view.coffee1
-rw-r--r--sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-header-view.js1
2 files changed, 2 insertions, 0 deletions
diff --git a/sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-header-view.coffee b/sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-header-view.coffee
index 932de7a1e33..69900f06562 100644
--- a/sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-header-view.coffee
+++ b/sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-header-view.coffee
@@ -33,6 +33,7 @@ define [
copyQualityGate: ->
copiedModel = new QualityGate @model.toJSON()
+ copiedModel.set 'default', false
@options.app.qualityGateEditView.method = 'copy'
@options.app.qualityGateEditView.model = copiedModel
@options.app.qualityGateEditView.show()
diff --git a/sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-header-view.js b/sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-header-view.js
index 1ec05e1ea63..c2f5cf0b8ed 100644
--- a/sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-header-view.js
+++ b/sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-header-view.js
@@ -38,6 +38,7 @@
QualityGateDetailHeaderView.prototype.copyQualityGate = function() {
var copiedModel;
copiedModel = new QualityGate(this.model.toJSON());
+ copiedModel.set('default', false);
this.options.app.qualityGateEditView.method = 'copy';
this.options.app.qualityGateEditView.model = copiedModel;
return this.options.app.qualityGateEditView.show();