gyselroth / redmine-plugin-autorespond

Redmine Autoresponder Plugin for anonymously created tickets
MIT License
2 stars 3 forks source link

Redmine 4.1.0.stable #5

Open NomisGnos opened 4 years ago

NomisGnos commented 4 years ago

This is exactly what I need for our use-case but it does not work with Redmine 4.1.0.stable.

NomisGnos commented 4 years ago

With Rails 5.0 the use of alias_method_chain is deprecated. Someone has to rewrite the plugin and use "prepend" to include the code instead. Further info: https://www.justinweiss.com/articles/rails-5-module-number-prepend-and-the-end-of-alias-method-chain/

When I ran bundle exec rake redmine:plugins:migrate RAILS_ENV=production the error came up with NoMethodError: undefined methodalias_method_chain' for MailHandlerController:Class Did you mean? alias_method /opt/redmine/plugins/autorespond/lib/autorespond_mail_handler_controller_patch.rb:8:in block in included' ....

juckerf commented 4 years ago

I'm currently very busy. But if I find the time I'll try to rewrite autorespond_mail_handler_controller_patch.rb with a better alternative to the alias_method_chain-pattern (see also #3 ). In the meantime feel free to submit a PR to fix the issue.

NomisGnos commented 4 years ago

I was digging around found a few solutions that could have worked. One was the use of alias_method and the other was Method#Prepend. I rewrote the code but it didn't seem to have worked. There were no errors with the rake command for redmine:plugins:migrate. I could save my text for the email. However I was unable to get an email. I went even further and modified the CORE code for mail_handler_controller.rb and just directly replaced it. I restarted nginx and nothing happened when I created an issue via email. Am I missing something?