Fixing the Journal display on the issue list. #1276

This commit is contained in:
Eric Davis
2008-06-04 18:20:41 -07:00
parent b048542307
commit e691f4c2f0
2 changed files with 14 additions and 0 deletions
+2
View File
@@ -36,4 +36,6 @@ Redmine::Plugin.register :budget_plugin do
add_hook(:project_member_list_header, Proc.new { |context| BudgetProjectHook.member_list_header(context) })
add_hook(:project_member_list_column_three, Proc.new { |context| BudgetProjectHook.member_list_column_three(context) })
add_hook(:issues_helper_show_details, Proc.new { |context| BudgetIssueHook.issue_helper_show_details(context) })
end
+12
View File
@@ -37,4 +37,16 @@ class BudgetIssueHook
context[:issue].deliverable = Deliverable.find(context[:params][:deliverable_id]) unless context[:params][:deliverable_id].blank?
return ''
end
# TODO Later: Overwritting the caller is bad juju
def self.issue_helper_show_details(context = { })
if context[:detail].prop_key == 'deliverable_id'
d = Deliverable.find_by_id(context[:detail].value)
context[:detail].value = d.subject unless d.nil? || d.subject.nil?
d = Deliverable.find_by_id(context[:detail].old_value)
context[:detail].old_value = d.subject unless d.nil? || d.subject.nil?
end
''
end
end