]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5091 Fix display issue when duplicating default QG
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 10 Mar 2014 09:31:46 +0000 (10:31 +0100)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 10 Mar 2014 09:31:46 +0000 (10:31 +0100)
sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-header-view.coffee
sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-header-view.js

index 932de7a1e332a6923bd23cd01f4d7dfc03e8fed2..69900f065629a3f0b274ecdd4573d267bc5d0915 100644 (file)
@@ -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()
index 1ec05e1ea63b4885ecb32fc602c21542949f198c..c2f5cf0b8ed225b9ee3e8037be09ce7a8bc08a96 100644 (file)
@@ -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();