From 237559fb2cc2c9570aa0ea5946e6096dac7e2f6a Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Tue, 7 Feb 2012 17:24:57 +0100 Subject: [PATCH] SONAR-2124 Handle case when parent rule param has default empty value --- .../src/main/resources/org/sonar/l10n/core.properties | 1 + .../WEB-INF/app/views/rules_configuration/_rule_param.html.erb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties index e20cd46b711..ca6b6b3d4e0 100644 --- a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -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 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 77ea74f58d4..ce6f11f42f4 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 @@ -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 %> -- 2.39.5