annikoff / redmine_plugin_computed_custom_field

Computed Custom Field for Redmine
https://www.redmine.org/plugins/computed_custom_field
MIT License
80 stars 51 forks source link

Update subtasks when updating parent task #132

Closed skopjr closed 6 years ago

skopjr commented 6 years ago

There were several requests on how to update custom field values in subtasks, when we change parent task attributes online (ie without running a rake task).

Here is how: add these lines to app/controllers/issue_controller.rb

after_action :update_children, :only => [:update] ... def update_children @issue.descendants.each do |i| i.base_reload i.save! end end

annikoff commented 6 years ago

Thank you.