]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4272 Display metric name instead of key in widget property default value
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 27 Jan 2014 14:59:08 +0000 (15:59 +0100)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Mon, 27 Jan 2014 14:59:08 +0000 (15:59 +0100)
sonar-server/src/main/webapp/WEB-INF/app/helpers/widget_properties_helper.rb

index 57933a89f021950cf4a025119bc17bc5a522ac07..b38b6cc77e4b21f55c823bcad9321964cad9da8c 100644 (file)
@@ -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