Merge branch 'ticket/release-v2.0.0/474-changeset-journals' into release-v2.0.0
This commit is contained in:
commit
7c751b350d
|
@ -23,6 +23,7 @@ class Changeset < ActiveRecord::Base
|
|||
:event_description => :long_comments,
|
||||
:event_datetime => :committed_on,
|
||||
: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_find_options => {:include => [:user, {:repository => :project}]}
|
||||
acts_as_searchable :columns => 'comments',
|
||||
|
|
|
@ -135,8 +135,8 @@ module Redmine
|
|||
def journalized_activity_hash(options)
|
||||
options.tap do |h|
|
||||
h[:type] ||= plural_name
|
||||
h[:timestamp] = "#{journal_class.table_name}.created_at"
|
||||
h[:author_key] = "#{journal_class.table_name}.user_id"
|
||||
h[:timestamp] ||= "#{journal_class.table_name}.created_at"
|
||||
h[:author_key] ||= "#{journal_class.table_name}.user_id"
|
||||
|
||||
h[:find_options] ||= {} # in case it is nil
|
||||
h[:find_options] = {}.tap do |opts|
|
||||
|
@ -173,10 +173,11 @@ module Redmine
|
|||
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
|
||||
{ :description => :notes, :author => :user }.reverse_merge options
|
||||
options[:author] ||= :user
|
||||
{ :description => :notes }.reverse_merge options
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue