summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-06-18 17:33:07 +0200
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-06-18 17:34:56 +0200
commitf88bef4d748f030663ad0a0c9506607055d48f8c (patch)
tree75cdbba6c9c0f6ea4c82decd8f833afeb6e6a67f
parent7b8ec8c4770a2c856cc52f98feddb0231d172051 (diff)
downloadsonarqube-f88bef4d748f030663ad0a0c9506607055d48f8c.tar.gz
sonarqube-f88bef4d748f030663ad0a0c9506607055d48f8c.zip
SONAR-5356 Fix display of rule params in edition after creation
-rw-r--r--sonar-server/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee6
1 files changed, 4 insertions, 2 deletions
diff --git a/sonar-server/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee b/sonar-server/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee
index 26321af5804..6274e9fb44c 100644
--- a/sonar-server/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee
+++ b/sonar-server/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee
@@ -103,6 +103,7 @@ define [
data: postData
error: () ->
.done (r) =>
+ delete @templateRule
@options.app.showRule r.rule.key
@hide()
.fail (jqXHR, textStatus, errorThrown) =>
@@ -160,9 +161,10 @@ define [
params = {}
if @templateRule
params = @templateRule.get 'params'
- else if @model
+ else if @model and @model.has 'params'
params = @model.get('params').map (p) ->
- _.extend p, value: p.defaultValue
+ _.extend p,
+ value: p.defaultValue
_.extend super,
change: @model && @model.has 'key'