Mercurial > hg > soundsoftware-site
diff app/models/issue.rb @ 507:0c939c159af4 redmine-1.2
Update to Redmine 1.2.1 on 1.2-stable branch (Redmine SVN rev 6270)
author | Chris Cannam |
---|---|
date | Thu, 14 Jul 2011 10:32:19 +0100 |
parents | cbce1fd3b1b7 |
children | 851510f1b535 cbb26bc654de |
line wrap: on
line diff
--- a/app/models/issue.rb Mon Jun 06 14:24:13 2011 +0100 +++ b/app/models/issue.rb Thu Jul 14 10:32:19 2011 +0100 @@ -227,6 +227,13 @@ @custom_field_values = nil result end + + def description=(arg) + if arg.is_a?(String) + arg = arg.gsub(/(\r\n|\n|\r)/, "\r\n") + end + write_attribute(:description, arg) + end # Overrides attributes= so that tracker_id gets assigned first def attributes_with_tracker_first=(new_attributes, *args) @@ -870,10 +877,13 @@ if @current_journal # attributes changes (Issue.column_names - %w(id root_id lft rgt lock_version created_on updated_on)).each {|c| + before = @issue_before_change.send(c) + after = send(c) + next if before == after || (before.blank? && after.blank?) @current_journal.details << JournalDetail.new(:property => 'attr', :prop_key => c, :old_value => @issue_before_change.send(c), - :value => send(c)) unless send(c)==@issue_before_change.send(c) + :value => send(c)) } # custom fields changes custom_values.each {|c|