Open mverberg opened 5 years ago
same here. Ubuntu 18.4, ruby 2.5.1p57, rails 5.2.2
is there any solution? thanks
Also same issue. Ubuntu 18.04, ruby 2.5.1.p57, rails 5.2.3, Redmine 4.0.4
It seems @jrupesh is no longer active. This ticket is a duplicate to #45 Maybe there is someone with required ruby skills to step in for this project to migrate the code for redmine 4 / latest ruby? The code should be refactored anyway since the patches contain copied code which has been changed in 4.0.
The method alias-method-chain is depracated. More info on https://www.justinweiss.com/articles/rails-5-module-number-prepend-and-the-end-of-alias-method-chain/
Anyone has a fix?
I've just changed some methods, installed withoud errors, but not tested yet.. I'm not programmer, i hope someone remake normal, because i need only receive emails on any new task in one project when i've checked: only for things i watch or i'm involved in plugins->event_notifications->lib->event_notification->patches
in each *.rb need to rewrite alias_method_chain into alias_method
user.rb:
#alias_method_chain :update_notified_project_ids, :events
#alias_method_chain :notify_about?, :event
alias_method :update_notified_project_ids_without_events, :update_notified_project_ids
alias_method :update_notified_project_ids, :update_notified_project_ids_with_events
alias_method :notify_about_without_event?, :notify_about?
alias_method :notify_about?, :notify_about_with_event?
project_patch.rb
alias_method :notified_users_without_events, :notified_users
alias_method :notified_users, :notified_users_with_events
journal_patch.rb
alias_method :notified_users_without_events, :notified_users
alias_method :notified_users, :notified_users_with_events
Both migrate files need add version: (DB-->MIGRATE-->001 and 002
init.rb
Hello, I changed acc. latest post all files and remine starts, but some issues results in an 404er when I try to open. If I remove the event_notification plugin all works. If I only DISABLE in configuration also 404 happens.
After installing the plugin in Redmine 4.0.1 on Rails 5.2.2 and Ruby 2.5.3 using Mysql2:
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
rake aborted! NoMethodError: undefined method'
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)
alias_method_chain' for User (call 'User.connection' to establish a connection):Class Did you mean? alias_method /home/redmine/live/plugins/event_notifications/lib/event_notification/patches/user_patch.rb:11:in
block in included' /home/redmine/live/plugins/event_notifications/lib/event_notification/patches/user_patch.rb:9:inclass_eval' /home/redmine/live/plugins/event_notifications/lib/event_notification/patches/user_patch.rb:9:in
included' /home/redmine/live/plugins/event_notifications/lib/event_notification/patches/user_patch.rb:183:ininclude' /home/redmine/live/plugins/event_notifications/lib/event_notification/patches/user_patch.rb:183:in
<top (required)>' /home/redmine/live/plugins/event_notifications/init.rb:4:in<top (required)>' /home/redmine/live/lib/redmine/plugin.rb:173:in
block in load' /home/redmine/live/lib/redmine/plugin.rb:164:ineach' /home/redmine/live/lib/redmine/plugin.rb:164:in
load' /home/redmine/live/config/initializers/30-redmine.rb:21:in<top (required)>' /home/redmine/live/config/environment.rb:14:in
<top (required)>' /usr/bin/bundle:23:inload' /usr/bin/bundle:23:in
I found that the alias_method_chain is depreceated and have to be replaced. I really like to use your plugin, can you fix the bug?
with kind regards, Marcel