diff .svn/pristine/ad/ad957ccce8d55237a463953923542a0cf137f251.svn-base @ 1464:261b3d9a4903 redmine-2.4

Update to Redmine 2.4 branch rev 12663
author Chris Cannam
date Tue, 14 Jan 2014 14:37:42 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.svn/pristine/ad/ad957ccce8d55237a463953923542a0cf137f251.svn-base	Tue Jan 14 14:37:42 2014 +0000
@@ -0,0 +1,17 @@
+class SupportForMultipleCommitKeywords < ActiveRecord::Migration
+  def up
+    # Replaces commit_fix_keywords, commit_fix_status_id, commit_fix_done_ratio settings
+    # with commit_update_keywords setting
+    keywords = Setting.where(:name => 'commit_fix_keywords').limit(1).pluck(:value).first
+    status_id = Setting.where(:name => 'commit_fix_status_id').limit(1).pluck(:value).first
+    done_ratio = Setting.where(:name => 'commit_fix_done_ratio').limit(1).pluck(:value).first
+    if keywords.present?
+      Setting.commit_update_keywords = [{'keywords' => keywords, 'status_id' => status_id, 'done_ratio' => done_ratio}]
+    end
+    Setting.where(:name => %w(commit_fix_keywords commit_fix_status_id commit_fix_done_ratio)).delete_all
+  end
+
+  def down
+    Setting.where(:name => 'commit_update_keywords').delete_all
+  end
+end