[#474] Changesets should use the author method for events
This will let them pick up the committer string if user is nil
This commit is contained in:
parent
3d164f1da0
commit
1cf08ee300
|
@ -23,6 +23,7 @@ class Changeset < ActiveRecord::Base
|
||||||
:event_description => :long_comments,
|
:event_description => :long_comments,
|
||||||
:event_datetime => :committed_on,
|
:event_datetime => :committed_on,
|
||||||
:event_url => Proc.new {|o| {:controller => 'repositories', :action => 'revision', :id => o.repository.project, :rev => o.identifier}},
|
:event_url => Proc.new {|o| {:controller => 'repositories', :action => 'revision', :id => o.repository.project, :rev => o.identifier}},
|
||||||
|
:event_author => Proc.new {|o| o.author},
|
||||||
:activity_timestamp => "#{table_name}.committed_on",
|
:activity_timestamp => "#{table_name}.committed_on",
|
||||||
:activity_find_options => {:include => [:user, {:repository => :project}]}
|
:activity_find_options => {:include => [:user, {:repository => :project}]}
|
||||||
acts_as_searchable :columns => 'comments',
|
acts_as_searchable :columns => 'comments',
|
||||||
|
|
|
@ -173,10 +173,11 @@ module Redmine
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
options[:type] ||= self.name.underscore.dasherize # Make sure the name of the journalized model and not the name of the journal is used for events
|
options[:type] ||= self.name.underscore.dasherize # Make sure the name of the journalized model and not the name of the journal is used for events
|
||||||
{ :description => :notes, :author => :user }.reverse_merge options
|
options[:author] ||= :user
|
||||||
|
{ :description => :notes }.reverse_merge options
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue