Defect #13119

custom_field_values are not reloaded on #reload

Added by Thomas Kohler almost 5 years ago. Updated almost 5 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Code cleanup/refactoring
Target version:2.3.0
Resolution:Fixed Affected version:

Description

Sometimes this method gives an empty array but there are some custom field values in my case for "a_issue". A workaround for that is to delete "@custom_field_values" before call the method like this:

a_issue.reset_custom_values!
a_issue.save_custom_field_values

tc_redmine_defects.rb Magnifier - testcases for the defect (9.02 KB) Thomas Kohler, 2013-02-10 21:07

Associated revisions

Revision 11349
Added by Jean-Philippe Lang almost 5 years ago

Fixed that custom_field_values are not reloaded on #reload (#13119).

History

#1 Updated by Jean-Philippe Lang almost 5 years ago

Can you provide a failing test?

#2 Updated by Thomas Kohler almost 5 years ago

I hope this helps. Be aware I'm an ruby beginner ;o}

#3 Updated by Jean-Philippe Lang almost 5 years ago

  • Subject changed from "custom_field_values" of "acts_as_customizable.rb" unreliable? to custom_field_values are not reloaded on #reload
  • Category changed from Custom fields to Code cleanup/refactoring
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.3.0
  • Resolution set to Fixed

r11349 makes your tests pass. #reload now reloads custom_field_values which is needed when you create a custom_field after the issue like in your test.

#4 Updated by Thomas Kohler almost 5 years ago

Thank you very much - this fix the problem for me.

Also available in: Atom PDF