From: Simon Brandhof Date: Tue, 4 Oct 2011 08:37:59 +0000 (+0200) Subject: SONAR-2855 Metrics are not sorted in the configuration panel of widgets X-Git-Tag: 2.12~223 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bd6fc6baa784dffde1efa286144dbf6b0a883bf9;p=sonarqube.git SONAR-2855 Metrics are not sorted in the configuration panel of widgets --- 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 c5c358ee8b8..dfe9f84c012 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 @@ -31,7 +31,7 @@ module WidgetPropertiesHelper check_box_tag definition.key(), "true", val=='true' elsif definition.type.name()==WidgetProperty::TYPE_METRIC - select_tag definition.key(), options_grouped_by_domain(Metric.all.select{|m| m.display?}, val, :include_empty => true) + select_tag definition.key(), options_grouped_by_domain(Metric.all.select{|m| m.display?}.sort_by{|m| m.short_name}, val, :include_empty => true) elsif definition.type.name()==WidgetProperty::TYPE_STRING text_field_tag definition.key(), val, :size => 10