From 43862fc3b907a5591eda2f624537d970a7e181ea Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Wed, 17 Mar 2010 18:45:20 -0700 Subject: [PATCH] Fixes editing an issue's deliverable. Broken by the Redmine core in r3308. --- lib/budget_issue_hook.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/budget_issue_hook.rb b/lib/budget_issue_hook.rb index 28884fa..082caf0 100644 --- a/lib/budget_issue_hook.rb +++ b/lib/budget_issue_hook.rb @@ -47,6 +47,13 @@ class BudgetIssueHook < Redmine::Hook::ViewListener return '' end end + + def controller_issues_edit_before_save(context = {}) + if context[:params] && context[:params][:issue] + context[:issue].deliverable = Deliverable.find_by_id_and_project_id(context[:params][:issue][:deliverable_id], context[:issue].project.id) + end + return '' + end # Saves the Deliverable assignment to the issue #