Commit 7c751b35 authored by Eric Davis's avatar Eric Davis

Merge branch 'ticket/release-v2.0.0/474-changeset-journals' into release-v2.0.0

parents 3d164f1d 2f365750
......@@ -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
\ No newline at end of file
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment