aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-07-16 16:14:16 +0200
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-07-16 16:14:16 +0200
commitf92fb66e05bc0d891a97b12a5ef4952742fcbf12 (patch)
tree05e5a3d64d24ed1bca890e8f8c1a13d6f8ac6326 /server/sonar-web/src/main
parentb852e0e1beef8e3b0d7da0b76e006e82201d8d6d (diff)
downloadsonarqube-f92fb66e05bc0d891a97b12a5ef4952742fcbf12.tar.gz
sonarqube-f92fb66e05bc0d891a97b12a5ef4952742fcbf12.zip
SONAR-5001 Set correct description_format depending on rule type
Diffstat (limited to 'server/sonar-web/src/main')
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/581_add_rules_description_format.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/581_add_rules_description_format.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/581_add_rules_description_format.rb
index ea5eec81f89..86279629f82 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/581_add_rules_description_format.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/581_add_rules_description_format.rb
@@ -7,7 +7,8 @@ class AddRulesDescriptionFormat < ActiveRecord::Migration
add_column :rules, :description_format, :string, :null => true, :limit => 20
Rule.reset_column_information
- Rule.update_all({:description_format => 'HTML', :updated_at => Time.now})
+ Rule.update_all({:description_format => 'HTML', :updated_at => Time.now}, "plugin_name != 'manual' AND template_id IS NULL")
+ Rule.update_all({:description_format => 'MARKDOWN', :updated_at => Time.now}, "plugin_name = 'manual' OR template_id IS NOT NULL")
end
end