Fixing the Journal display on the issue list. #1276
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user