From d08d973b0f6d93292154e45f3a3fb174e10d3f3e Mon Sep 17 00:00:00 2001 From: hjust Date: Tue, 23 Feb 2010 11:22:28 +0000 Subject: [PATCH] params hash is contained in the context hash. git-svn-id: https://dev.finn.de/svn/cockpit/trunk@522 7926756e-e54e-46e6-9721-ed318f58905e --- lib/costs_issue_hook.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/costs_issue_hook.rb b/lib/costs_issue_hook.rb index 7a1917eef2..109d5e199b 100644 --- a/lib/costs_issue_hook.rb +++ b/lib/costs_issue_hook.rb @@ -25,7 +25,8 @@ class CostsIssueHook < Redmine::Hook::ViewListener def controller_issues_move_before_save(context={}) # FIXME: In case of copy==true, this will break stuff if the original issue is saved - case params[:cost_object_id] + cost_object_id = context[:params] && context[:params][:cost_object_id] + case cost_object_id when "" # a.k.a "(No change)" # cost objects HAVE to be changed if move is performed across project boundaries # as the are project specific @@ -33,7 +34,7 @@ class CostsIssueHook < Redmine::Hook::ViewListener when "none" issue.cost_object_id = nil else - issue.cost_object_id = params[:cost_object_id] + issue.cost_object_id = cost_object_id end end