Open mbuchner opened 10 years ago
Any update on this one?
I'm sorry, I have no time to look at this at the moment.
Hi, I ran into this same problem, and I have fixed it.
Go to _{redmine_folder}/plugins/redmine_release_notes/app/controllers/release_notescontroller.rb and change the function destroy with this one:
def destroy
release_note = ReleaseNote.find(params[:id])
@issue = Issue.find(release_note.issue_id)
update_custom_field(false)
release_note.destroy
flash[:notice] = l(:notice_successful_delete)
redirect_to @issue
end
We installed your plugin in Redmine:
Environment: Redmine version 2.2.3.stable Ruby version 1.8.7 (x86_64-linux) Rails version 3.2.12 Environment production Database adapter MySQL Redmine plugins: due_date_reminder 0.3.2 projects_table 0.0.4 redmine_inline_attach_screenshot 0.4.2 redmine_monitoring_controlling 0.1.1 redmine_mylyn_connector 2.8.2.stable redmine_release_notes 1.3.1
If we try to delete a release note we get asked if we really want to delete it and then get forwarded to an error page! The following error is written to the log file:
NoMethodError (undefined method
release_notes_custom_value' for nil:NilClass): plugins/redmine_release_notes/app/controllers/release_notes_controller.rb:115:in
update_custom_field' plugins/redmine_release_notes/app/controllers/release_notes_controller.rb:70:indestroy' actionpack (3.2.12) lib/action_controller/metal/implicit_render.rb:4:in
send_action' actionpack (3.2.12) lib/action_controller/metal/implicit_render.rb:4:insend_action' actionpack (3.2.12) lib/abstract_controller/base.rb:167:in
process_action' actionpack (3.2.12) lib/action_controller/metal/rendering.rb:10:inprocess_action' actionpack (3.2.12) lib/abstract_controller/callbacks.rb:18:in
process_action' activesupport (3.2.12) lib/active_support/callbacks.rb:458:in_run__722325261__process_action__556031166__callbacks' activesupport (3.2.12) lib/active_support/callbacks.rb:405:in
send' activesupport (3.2.12) lib/active_support/callbacks.rb:405:in__run_callback' activesupport (3.2.12) lib/active_support/callbacks.rb:385:in
_run_process_action_callbacks' activesupport (3.2.12) lib/active_support/callbacks.rb:81:insend' activesupport (3.2.12) lib/active_support/callbacks.rb:81:in
run_callbacks' actionpack (3.2.12) lib/abstract_controller/callbacks.rb:17:inprocess_action' actionpack (3.2.12) lib/action_controller/metal/rescue.rb:29:in
process_action' actionpack (3.2.12) lib/action_controller/metal/instrumentation.rb:30:inprocess_action' activesupport (3.2.12) lib/active_support/notifications.rb:123:in
instrument' activesupport (3.2.12) lib/active_support/notifications/instrumenter.rb:20:ininstrument' activesupport (3.2.12) lib/active_support/notifications.rb:123:in
instrument' actionpack (3.2.12) lib/action_controller/metal/instrumentation.rb:29:inprocess_action' actionpack (3.2.12) lib/action_controller/metal/params_wrapper.rb:207:in
process_action' activerecord (3.2.12) lib/active_record/railties/controller_runtime.rb:18:inprocess_action' actionpack (3.2.12) lib/abstract_controller/base.rb:121:in
process' actionpack (3.2.12) lib/abstract_controller/rendering.rb:45:inprocess' actionpack (3.2.12) lib/action_controller/metal.rb:203:in
dispatch' actionpack (3.2.12) lib/action_controller/metal/rack_delegation.rb:14:indispatch' actionpack (3.2.12) lib/action_controller/metal.rb:246:in
action' actionpack (3.2.12) lib/action_dispatch/routing/route_set.rb:73:incall' actionpack (3.2.12) lib/action_dispatch/routing/route_set.rb:73:in
dispatch' actionpack (3.2.12) lib/action_dispatch/routing/route_set.rb:36:incall' journey (1.0.4) lib/journey/router.rb:68:in
call' journey (1.0.4) lib/journey/router.rb:56:ineach' journey (1.0.4) lib/journey/router.rb:56:in
call' actionpack (3.2.12) lib/action_dispatch/routing/route_set.rb:601:incall' rack-openid (1.3.1) lib/rack/openid.rb:98:in
call' actionpack (3.2.12) lib/action_dispatch/middleware/best_standards_support.rb:17:incall' rack (1.4.5) lib/rack/etag.rb:23:in
call' rack (1.4.5) lib/rack/conditionalget.rb:35:incall' actionpack (3.2.12) lib/action_dispatch/middleware/head.rb:14:in
call' actionpack (3.2.12) lib/action_dispatch/middleware/params_parser.rb:21:incall' actionpack (3.2.12) lib/action_dispatch/middleware/flash.rb:242:in
call' rack (1.4.5) lib/rack/session/abstract/id.rb:210:incontext' rack (1.4.5) lib/rack/session/abstract/id.rb:205:in
call' actionpack (3.2.12) lib/action_dispatch/middleware/cookies.rb:341:incall' activerecord (3.2.12) lib/active_record/query_cache.rb:64:in
call' activerecord (3.2.12) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:incall' actionpack (3.2.12) lib/action_dispatch/middleware/callbacks.rb:28:in
call' activesupport (3.2.12) lib/active_support/callbacks.rb:405:in_run__581174207__call__4__callbacks' activesupport (3.2.12) lib/active_support/callbacks.rb:405:in
send' activesupport (3.2.12) lib/active_support/callbacks.rb:405:in__run_callback' activesupport (3.2.12) lib/active_support/callbacks.rb:385:in
_run_call_callbacks' activesupport (3.2.12) lib/active_support/callbacks.rb:81:insend' activesupport (3.2.12) lib/active_support/callbacks.rb:81:in
run_callbacks' actionpack (3.2.12) lib/action_dispatch/middleware/callbacks.rb:27:incall' actionpack (3.2.12) lib/action_dispatch/middleware/remote_ip.rb:31:in
call' actionpack (3.2.12) lib/action_dispatch/middleware/debug_exceptions.rb:16:incall' actionpack (3.2.12) lib/action_dispatch/middleware/show_exceptions.rb:56:in
call' railties (3.2.12) lib/rails/rack/logger.rb:32:incall_app' railties (3.2.12) lib/rails/rack/logger.rb:16:in
call' activesupport (3.2.12) lib/active_support/tagged_logging.rb:22:intagged' railties (3.2.12) lib/rails/rack/logger.rb:16:in
call' actionpack (3.2.12) lib/action_dispatch/middleware/request_id.rb:22:incall' rack (1.4.5) lib/rack/methodoverride.rb:21:in
call' rack (1.4.5) lib/rack/runtime.rb:17:incall' activesupport (3.2.12) lib/active_support/cache/strategy/local_cache.rb:72:in
call' rack (1.4.5) lib/rack/lock.rb:15:incall' actionpack (3.2.12) lib/action_dispatch/middleware/static.rb:62:in
call' rack-cache (1.2) lib/rack/cache/context.rb:136:inforward' rack-cache (1.2) lib/rack/cache/context.rb:143:in
pass' rack-cache (1.2) lib/rack/cache/context.rb:155:ininvalidate' rack-cache (1.2) lib/rack/cache/context.rb:71:in
call!' rack-cache (1.2) lib/rack/cache/context.rb:51:incall' railties (3.2.12) lib/rails/engine.rb:479:in
call' railties (3.2.12) lib/rails/application.rb:223:incall' railties (3.2.12) lib/rails/railtie/configurable.rb:30:in
send' railties (3.2.12) lib/rails/railtie/configurable.rb:30:inmethod_missing' /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in
process_request' /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:inmain_loop' /usr/lib/ruby/1.8/phusion_passenger/rack/application_spawner.rb:118:in
run' /usr/lib/ruby/1.8/phusion_passenger/rack/application_spawner.rb:65:inspawn_application' /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in
safe_fork' /usr/lib/ruby/1.8/phusion_passenger/rack/application_spawner.rb:58:inspawn_application' /usr/lib/ruby/1.8/phusion_passenger/rack/application_spawner.rb:41:in
spawn_application' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:159:inspawn_application' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in
handle_spawn_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in__send__' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in
main_loop' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in`start_synchronously' /usr/lib/phusion_passenger/passenger-spawn-server:61We created a custom list file -> see screen shot