Renamed #changes association to #ticket_changes.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9760 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-06-03 11:47:26 +00:00
parent 2cbf9c9cc4
commit 182a215c7b
1 changed files with 2 additions and 2 deletions

View File

@ -163,7 +163,7 @@ namespace :redmine do
set_inheritance_column :none set_inheritance_column :none
# ticket changes: only migrate status changes and comments # ticket changes: only migrate status changes and comments
has_many :changes, :class_name => "TracTicketChange", :foreign_key => :ticket has_many :ticket_changes, :class_name => "TracTicketChange", :foreign_key => :ticket
has_many :customs, :class_name => "TracTicketCustom", :foreign_key => :ticket has_many :customs, :class_name => "TracTicketCustom", :foreign_key => :ticket
def attachments def attachments
@ -487,7 +487,7 @@ namespace :redmine do
end end
# Comments and status/resolution changes # Comments and status/resolution changes
ticket.changes.group_by(&:time).each do |time, changeset| ticket.ticket_changes.group_by(&:time).each do |time, changeset|
status_change = changeset.select {|change| change.field == 'status'}.first status_change = changeset.select {|change| change.field == 'status'}.first
resolution_change = changeset.select {|change| change.field == 'resolution'}.first resolution_change = changeset.select {|change| change.field == 'resolution'}.first
comment_change = changeset.select {|change| change.field == 'comment'}.first comment_change = changeset.select {|change| change.field == 'comment'}.first