Project

General

Profile

Actions

Defect #3672

open

Unable to set "value" and "old_value" through :helper_issues_show_detail_after_setting hook

Added by Giovanni Junior over 15 years ago. Updated almost 12 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Plugin API
Target version:
-
Start date:
2009-07-25
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

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

issues_helper.rb.patch (844 Bytes) issues_helper.rb.patch Thomas Löber, 2010-02-19 13:39
Actions

Also available in: Atom PDF