--- ..\redmine-0.8.4-clean\app\models\time_entry.rb Sun May 17 11:15:40 2009 +++ app\models\time_entry.rb Wed Aug 26 13:20:37 2009 @@ -26,10 +26,21 @@ attr_protected :project_id, :user_id, :tyear, :tmonth, :tweek acts_as_customizable - acts_as_event :title => Proc.new {|o| "#{o.user}: #{lwr(:label_f_hour, o.hours)} (#{(o.issue || o.project).event_title})"}, - :url => Proc.new {|o| {:controller => 'timelog', :action => 'details', :project_id => o.project}}, + acts_as_event :title => Proc.new {|o| "#{lwr(:label_f_hour, o.hours)} (#{(o.issue || o.project).event_title})"}, + :url => Proc.new {|o| {:controller => 'timelog', :action => 'details', :project_id => o.project, :issue_id => o.issue}}, :author => :user, :description => :comments + + + acts_as_activity_provider :timestamp => "#{table_name}.created_on", + :author_key => :user_id, + :find_options => {:include => :project} + + + acts_as_searchable :columns => 'comments', + :project_key => ".project_id", + :date_column => "#{table_name}.created_on" + validates_presence_of :user_id, :activity_id, :project_id, :hours, :spent_on validates_numericality_of :hours, :allow_nil => true, :message => :activerecord_error_invalid