move to STI for journals so the journals themselves can be events
This commit is contained in:
parent
2287d7ce8c
commit
ff31875149
|
@ -197,7 +197,7 @@ class MailHandler < ActionMailer::Base
|
|||
# Reply will be added to the issue
|
||||
def receive_journal_reply(journal_id)
|
||||
journal = Journal.find_by_id(journal_id)
|
||||
if journal && journal.versioned_type == 'Issue'
|
||||
if journal && journal.versioned.is_a? Issue
|
||||
receive_issue_reply(journal.versioned_id)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -67,7 +67,7 @@ class Mailer < ActionMailer::Base
|
|||
# Watchers in cc
|
||||
cc(issue.watcher_recipients - @recipients)
|
||||
s = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] "
|
||||
s << "(#{issue.status.name}) " if journal.new_value_for('status_id')
|
||||
s << "(#{issue.status.name}) " if journal.details['status_id']
|
||||
s << issue.subject
|
||||
subject s
|
||||
body :issue => issue,
|
||||
|
|
|
@ -26,7 +26,7 @@ class TimeEntry < ActiveRecord::Base
|
|||
attr_protected :project_id, :user_id, :tyear, :tmonth, :tweek
|
||||
|
||||
acts_as_customizable
|
||||
acts_as_journalized :event_title => Proc.new {|o| "#{l_hours(o.hours)} (#{(o.issue || o.project).event_title})"},
|
||||
acts_as_journalized :event_title => Proc.new {|o| "#{l_hours(o.hours)} (#{(o.issue || o.project).current_journal.event_title})"},
|
||||
:event_url => Proc.new {|o| {:controller => 'timelog', :action => 'details', :project_id => o.project, :issue_id => o.issue}},
|
||||
:event_author => :user,
|
||||
:event_description => :comments
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
<% if journal.details.any? %>
|
||||
<ul class="details">
|
||||
<% for detail in journal.details %>
|
||||
<li><%= journal.show_detail(detail) %></li>
|
||||
<% if d = journal.show_detail(detail) %>
|
||||
<li><%= d %></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
|
|
@ -73,7 +73,7 @@ module Redmine
|
|||
end
|
||||
|
||||
with_scope(:find => scope_options) do
|
||||
Journal.find(:all, provider_options[:find_options].dup)
|
||||
journal_class.find(:all, provider_options[:find_options].dup)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue