diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2013-12-20 14:58:52 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2013-12-20 14:58:52 +0100 |
commit | 3afa92275641a77f49aa37a8c638003aec3f8396 (patch) | |
tree | 1d4416153f4378c5edea06aa6dd9771ca4511c2d /sonar-server/src/main/webapp/WEB-INF/app | |
parent | f3a779a298a7a344ae56889eda8b6673994a61f0 (diff) | |
download | sonarqube-3afa92275641a77f49aa37a8c638003aec3f8396.tar.gz sonarqube-3afa92275641a77f49aa37a8c638003aec3f8396.zip |
Fix issue when displaying rule parameter on not active rules
Diffstat (limited to 'sonar-server/src/main/webapp/WEB-INF/app')
2 files changed, 7 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/new_rules_configuration/_rule_param.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/new_rules_configuration/_rule_param.html.erb index 0fa93e21b12..d7f639afd95 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/new_rules_configuration/_rule_param.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/new_rules_configuration/_rule_param.html.erb @@ -1,6 +1,9 @@ <% # locals = rule, profile, parameter + # Display default value only for inactive rules param_id = "#{rule.id}#{parameter.key}" - param_value = parameter.value || '' + # Display default value only for inactive rules + param_value = parameter.default_value if !rule.activeRuleId + param_value = parameter.value if !param_value active_rule_id = rule.activeRuleId read_only = rule.activeRuleId.nil? || !profiles_administrator? %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb index a44e972bf74..bd034cc8a24 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb @@ -1,5 +1,7 @@ <% - param_value = active_parameter.value if active_parameter + # Display default value only for inactive rules + param_value = parameter.default_value if !active_rule + param_value = active_parameter.value if !param_value && active_parameter active_param_id = active_parameter.id if active_parameter active_rule_id = active_rule.id if active_rule read_only = !active_rule || !profiles_administrator? |