ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Regression on editing hook values in helper_issues_show_detail_after_setting (Bug #622)


Added by Eric Davis at 2011-09-14 08:26 pm.


Status:Open Start date:2011-09-14
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Plugin API
Target version:-
Remote issue URL: Affected version:2.1.1

Description

e2d16e1397b7 fixed an API compatibility (good) but it caused a regression on the ability for a hook to edit the journal detail attributes. Short version: hooks have always been limited so they cannot change the object passed in via context but they can edit those object's attributes. So in this case a hook cannot edit detail but it can edit detail.value (by edit I mean make a change that the hook caller sees).

I've posted more details on the commit but I haven't had the time to get a fix working yet. A simple test is to create a hook and try to change an attribute in the detail object.

1SomeHookClass
2  #...
3  def helper_issues_show_detail_after_setting(context = { })
4    context[:detail].old_value = "Old value should now be changed to this hardcoded value" 
5  end
6end

(This might even be caused by AAJ but I haven't dug back through the history).


Associated revisions

Revision d859d38d
Added by Jean-Philippe Lang at 2008-02-10 03:24 pm

Translation updates:
  • Finnish (Antti Perkiömäki, #612)
  • Russian (Michael Pirogov, #622)

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1132 e93f8b46-1217-0410-a6f0-8f06a7374b81

History

Also available in: Atom PDF