Defect #3672
openUnable to set "value" and "old_value" through :helper_issues_show_detail_after_setting hook
0%
Description
In http://www.redmine.org/wiki/1/Hooks, the description for :helper_issues_show_detail_after_setting states that it "Passes data to the hook to allow it to set the label and value", but it seems this is only partially true.
Setting context variables in a hook using the "=" operand just doesn't work. For "context[:label]", which is already initialized (as a String) when the hook is called, this may be worked around calling "context[:label].replace". However, as "context[:value]" and "context[:old_value]" may be uninitialized when the hook is called, I don't see a way to change their value at all. And setting "context[:detail].value" and "context[:detail].old_value" is obviously not as harmless as setting "context[:value]" and "context[:old_value]".
Using Redmine 0.8.4, Rails 2.1.2 and Ruby 1.8.6.
Files