From 8e26488fe53000880048ec6965e358d1bc9206a2 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Fri, 25 May 2012 18:06:26 +0200 Subject: [PATCH] SONAR-2706 Search for rule name in the English bundle before DB --- sonar-server/src/main/webapp/WEB-INF/app/models/rule.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/rule.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/rule.rb index a9d96e1bae5..ec7e9c2b622 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/rule.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/rule.rb @@ -80,9 +80,9 @@ class Rule < ActiveRecord::Base else @raw_name ||= begin - result = read_attribute(:name) - # if no name present in the DB, then name is in the English bundle for sure - result = Java::OrgSonarServerUi::JRubyFacade.getInstance().getRuleName("en", repository_key, plugin_rule_key) unless result + result = Java::OrgSonarServerUi::JRubyFacade.getInstance().getRuleName("en", repository_key, plugin_rule_key) + # if no name present in the bundle, try to find it in the DB + result = read_attribute(:name) unless result result end end -- 2.39.5