Index: app/models/time_entry.rb =================================================================== --- app/models/time_entry.rb (revisi¢n: 2704) +++ app/models/time_entry.rb (revisi¢n: 2706) @@ -107,4 +107,7 @@ end TimeEntry.maximum(:spent_on, :include => :project, :conditions => finder_conditions.conditions) end + if ActiveRecord::Base.connection.adapter_name == 'OracleEnhanced' + set_date_columns :spent_on, :created_on, :updated_on + end end Index: app/models/version.rb =================================================================== --- app/models/version.rb (revisi¢n: 2704) +++ app/models/version.rb (revisi¢n: 2706) @@ -78,7 +78,7 @@ if completed_pourcent == 100 return false elsif due_date && start_date - done_date = start_date + ((due_date - start_date+1)* completed_pourcent/100).floor + done_date = start_date.to_date + ((due_date.to_date - start_date.to_date+1)* completed_pourcent/100).floor return done_date <= Date.today else false # No issues so it's not late Index: app/models/project.rb =================================================================== --- app/models/project.rb (revisi¢n: 2704) +++ app/models/project.rb (revisi¢n: 2706) @@ -477,7 +477,7 @@ # The earliest start date of a project, based on it's issues and versions def start_date [ - issues.minimum('start_date'), + (issues.minimum('start_date')).to_date, shared_versions.collect(&:effective_date), shared_versions.collect(&:start_date) ].flatten.compact.min @@ -486,9 +486,9 @@ # The latest due date of an issue or version def due_date [ - issues.maximum('due_date'), + (issues.maximum('due_date')).to_date, shared_versions.collect(&:effective_date), - shared_versions.collect {|v| v.fixed_issues.maximum('due_date')} + shared_versions.collect {|v| (v.fixed_issues.maximum('due_date')).to_date} ].flatten.compact.max end Index: db/migrate/20100129193402_change_users_mail_notification_to_string.rb =================================================================== --- db/migrate/20100129193402_change_users_mail_notification_to_string.rb (revisi¢n: 2704) +++ db/migrate/20100129193402_change_users_mail_notification_to_string.rb (revisi¢n: 2706) @@ -1,17 +1,17 @@ -class ChangeUsersMailNotificationToString < ActiveRecord::Migration - def self.up - rename_column :users, :mail_notification, :mail_notification_bool - add_column :users, :mail_notification, :string, :default => '', :null => false - User.update_all("mail_notification = 'all'", "mail_notification_bool = #{connection.quoted_true}") - User.update_all("mail_notification = 'selected'", "EXISTS (SELECT 1 FROM #{Member.table_name} WHERE #{Member.table_name}.mail_notification = #{connection.quoted_true} AND #{Member.table_name}.user_id = #{User.table_name}.id)") - User.update_all("mail_notification = 'only_my_events'", "mail_notification NOT IN ('all', 'selected')") - remove_column :users, :mail_notification_bool - end - - def self.down - rename_column :users, :mail_notification, :mail_notification_char - add_column :users, :mail_notification, :boolean, :default => true, :null => false - User.update_all("mail_notification = #{connection.quoted_false}", "mail_notification_char <> 'all'") - remove_column :users, :mail_notification_char - end -end +class ChangeUsersMailNotificationToString < ActiveRecord::Migration + def self.up + rename_column :users, :mail_notification, :mail_notification_bool + add_column :users, :mail_notification, :string, :default => '', :null => true + User.update_all("mail_notification = 'all'", "mail_notification_bool = #{connection.quoted_true}") + User.update_all("mail_notification = 'selected'", "EXISTS (SELECT 1 FROM #{Member.table_name} WHERE #{Member.table_name}.mail_notification = #{connection.quoted_true} AND #{Member.table_name}.user_id = #{User.table_name}.id)") + User.update_all("mail_notification = 'only_my_events'", "mail_notification NOT IN ('all', 'selected')") + remove_column :users, :mail_notification_bool + end + + def self.down + rename_column :users, :mail_notification, :mail_notification_char + add_column :users, :mail_notification, :boolean, :default => true, :null => true + User.update_all("mail_notification = #{connection.quoted_false}", "mail_notification_char <> 'all'") + remove_column :users, :mail_notification_char + end +end Index: db/migrate/20110227125750_change_journal_details_values_to_text.rb =================================================================== --- db/migrate/20110227125750_change_journal_details_values_to_text.rb (revisi¢n: 2704) +++ db/migrate/20110227125750_change_journal_details_values_to_text.rb (revisi¢n: 2706) @@ -1,11 +1,11 @@ -class ChangeJournalDetailsValuesToText < ActiveRecord::Migration - def self.up - change_column :journal_details, :old_value, :text - change_column :journal_details, :value, :text - end - - def self.down - change_column :journal_details, :old_value, :string - change_column :journal_details, :value, :string - end -end +class ChangeJournalDetailsValuesToText < ActiveRecord::Migration + def self.up + #change_column :journal_details, :old_value, :text + #change_column :journal_details, :value, :text + end + + def self.down + change_column :journal_details, :old_value, :string + change_column :journal_details, :value, :string + end +end Index: config/initializers/oracle_enhanced.rb =================================================================== --- config/initializers/oracle_enhanced.rb (revisi¢n: 0) +++ config/initializers/oracle_enhanced.rb (revisi¢n: 2706) @@ -0,0 +1,5 @@ +ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.emulate_dates_by_column_name=true +ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.instance_eval do + self.string_to_date_format="%d/%m/%Y" + self.string_to_time_format="%d/%m/%Y %H:%M:%S" +end Index: lib/redmine/codeset_util.rb =================================================================== --- lib/redmine/codeset_util.rb (revisi¢n: 2704) +++ lib/redmine/codeset_util.rb (revisi¢n: 2706) @@ -17,8 +17,8 @@ begin txtar += ic.iconv(str) rescue Iconv::IllegalSequence - txtar += $!.success - str = '?' + $!.failed[1,$!.failed.length] + txtar += ($!.success).to_s + str = '?' + (($!.failed).to_s[1,($!.failed).to_s.length]).to_s retry rescue txtar += $!.success Index: lib/redmine/helpers/gantt.rb =================================================================== --- lib/redmine/helpers/gantt.rb (revisi¢n: 2704) +++ lib/redmine/helpers/gantt.rb (revisi¢n: 2706) @@ -66,7 +66,7 @@ end @date_from = Date.civil(@year_from, @month_from, 1) - @date_to = (@date_from >> @months) - 1 + @date_to = ((@date_from >> @months) - 1).to_date @subjects = '' @lines = '' @@ -393,7 +393,7 @@ # Generates a gantt image # Only defined if RMagick is avalaible def to_image(format='PNG') - date_to = (@date_from >> @months)-1 + date_to = ((@date_from >> @months)-1).to_date show_weeks = @zoom > 1 show_days = @zoom > 2