params hash is contained in the context hash.

git-svn-id: https://dev.finn.de/svn/cockpit/trunk@522 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
hjust 15 years ago
parent f1dd81a7ee
commit d08d973b0f
  1. 5
      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

Loading…
Cancel
Save