use the journal formatters API to register the issue journal formats
This commit is contained in:
parent
4851451017
commit
d34abea14e
|
@ -36,9 +36,15 @@ class Issue < ActiveRecord::Base
|
|||
acts_as_customizable
|
||||
acts_as_watchable
|
||||
|
||||
acts_as_journalized :event_title => Proc.new {|o| "#{o.tracker.name} ##{o.id} (#{o.status}): #{o.subject}"},
|
||||
acts_as_journalized :event_title => Proc.new {|o| "#{o.tracker.name} ##{o.versioned.id} (#{o.status}): #{o.subject}"},
|
||||
:event_type => Proc.new {|o| 'issue' + (o.closed? ? ' closed' : '') }
|
||||
|
||||
register_on_journal_formatter(:id, 'parent_id')
|
||||
register_on_journal_formatter(:named_association, 'project_id', 'status_id', 'tracker_id', 'assigned_to_id',
|
||||
'priority_id', 'category_id', 'fixed_version_id')
|
||||
register_on_journal_formatter(:fraction, 'estimated_hours', 'done_ratio')
|
||||
register_on_journal_formatter(:datetime, 'due_date', 'start_date')
|
||||
|
||||
acts_as_searchable :columns => ['subject', "#{table_name}.description", "#{Journal.table_name}.notes"],
|
||||
:include => [:project, :journals],
|
||||
# sort by id so that limited eager loading doesn't break with postgresql
|
||||
|
|
Loading…
Reference in New Issue