]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2124 Handle case when parent rule param has default empty value
authorFabrice Bellingard <bellingard@gmail.com>
Tue, 7 Feb 2012 16:24:57 +0000 (17:24 +0100)
committerFabrice Bellingard <bellingard@gmail.com>
Tue, 7 Feb 2012 16:26:26 +0000 (17:26 +0100)
plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties
sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb

index e20cd46b7113e00602cab04c015638257e0b0bf3..ca6b6b3d4e07ffe211af6027555c200ca95b5471 100644 (file)
@@ -975,6 +975,7 @@ rules_configuration.expand_collapse=expand/collapse
 rules_configuration.html_allowed=HTML is allowed.
 rules_configuration.inherited_from_parent=Inherited from parent
 rules_configuration.overrides_parent_definition=Overrides parent definition
+rules_configuration.parent_parameter.empty=empty
 rules_configuration.copy_rule=Copy rule
 rules_configuration.edit_rule=Edit rule
 rules_configuration.revert_to_parent_definition=Revert to parent definition
index 77ea74f58d442c05499e9c85d9ae22f54ba0cee6..ce6f11f42f404a22f610ab3673f560091b6dc194 100644 (file)
@@ -37,7 +37,7 @@
     <% 
        if active_rule && active_rule.overrides? && ancestor_active_rule
          ancestor_param = ancestor_active_rule.active_param_by_param_id(parameter.id)
-         ancestor_value = ancestor_param.value unless ancestor_param.value.blank?
+         ancestor_value = ancestor_param && ancestor_param.value ? ancestor_param.value : '(' + message('rules_configuration.parent_parameter.empty') + ')'
              
          if ancestor_value && ancestor_value != param_value
     %>