From: Jean-Baptiste Lievremont Date: Mon, 27 Jan 2014 14:59:08 +0000 (+0100) Subject: SONAR-4272 Display metric name instead of key in widget property default value X-Git-Tag: 4.2~449 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0cfcbb509ef275f053e0c74ce2a0aa526b091117;p=sonarqube.git SONAR-4272 Display metric name instead of key in widget property default value --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb index 57933a89f02..b38b6cc77e4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb @@ -32,6 +32,7 @@ module WidgetPropertiesHelper # Boolean type should always have a default value, if no one is provided it's force to false defaultValue = property_def.type.name == PropertyType::TYPE_BOOLEAN ? 'false' : property_def.defaultValue if defaultValue.blank? defaultValue = '********' if property_def.type.name == PropertyType::TYPE_PASSWORD + defaultValue = Metric::name_for(defaultValue) if property_def.type.name == PropertyType::TYPE_METRIC defaultValue end