Closed zawadaa closed 6 years ago
I have the same problem. Redmine 3.4.3.
/rake reminder:exec RAILS_ENV="production" "
Project "Common tasks" with query "My1" sr/local is processing.2.4.2/bin/rake reminder:exec RAILS_ENV="production"
Project "My project" with query "My1" is processing.
rake aborted!
NameError: uninitialized constant MailReminderMailer::SortCriteria
/home/redmine/redmine/plugins/redmine_mail_reminder/app/models/mail_reminder_mailer.rb:34:in `block in issues_reminder'
/home/redmine/redmine/plugins/redmine_mail_reminder/app/models/mail_reminder_mailer.rb:31:in `issues_reminder'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/abstract_controller/base.rb:198:in `process_action'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/abstract_controller/callbacks.rb:19:in `process_action'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/abstract_controller/base.rb:137:in `process'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/actionview-4.2.8/lib/action_view/rendering.rb:30:in `process'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/actionmailer-4.2.8/lib/action_mailer/base.rb:596:in `block in process'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in `block in instrument'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in `instrument'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/actionmailer-4.2.8/lib/action_mailer/base.rb:593:in `process'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/actionmailer-4.2.8/lib/action_mailer/base.rb:584:in `initialize'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/actionmailer-4.2.8/lib/action_mailer/message_delivery.rb:25:in `new'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/actionmailer-4.2.8/lib/action_mailer/message_delivery.rb:25:in `__getobj__'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/actionmailer-4.2.8/lib/action_mailer/message_delivery.rb:34:in `message'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/actionmailer-4.2.8/lib/action_mailer/message_delivery.rb:85:in `deliver_now'
/home/redmine/redmine/config/initializers/10-patches.rb:163:in `deliver'
/home/redmine/redmine/plugins/redmine_mail_reminder/lib/tasks/reminder.rake:43:in `block (4 levels) in <top (required)>'
/home/redmine/redmine/plugins/redmine_mail_reminder/lib/tasks/reminder.rake:42:in `each'
/home/redmine/redmine/plugins/redmine_mail_reminder/lib/tasks/reminder.rake:42:in `block (3 levels) in <top (required)>'
/home/redmine/redmine/plugins/redmine_mail_reminder/app/models/mail_reminder_mailer.rb:23:in `with_synched_deliveries'
/home/redmine/redmine/plugins/redmine_mail_reminder/lib/tasks/reminder.rake:41:in `block (2 levels) in <top (required)>'
/home/redmine/redmine/vendor/bundle/ruby/2.4.0/gems/rake-12.2.1/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => reminder:exec
(See full trace by running task with --trace)
Same problem here with Redmine 3.4.3.
I have the same problem. Redmine 3.4.2.
I removed following code from /redmine_mail_reminder/app/models/mail_reminder_mailer.rb:
@sort_criteria = SortCriteria.new @sort_criteria.available_criteria = query.sortable_columns @sort_criteria.criteria = @sort_default if @sort_criteria.empty?
and changed code
issues = query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version], :order => sort_clause)
to
issues = query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version])
Restart.
It is working for me.
PS: I lost ordering. But it is not a big deal.
3.4 has not SortCriteria class! Right syntax is Redmine::SortCriteria, but it has not method available_criteria
When run:
Please help :-)