Due to the changes made in https://www.redmine.org/issues/38975, when running the Redmine Issue Templates on Redmine trunk, exceptions are thrown during the execution of rake redmine:plugins:migrate or when accessing the issue templates settings page.
F, [2024-03-26T07:44:28.445517 #80101] FATAL -- :
NoMethodError (undefined method `acts_as_positioned' for IssueTemplate:Class):
plugins/redmine_issue_templates/app/models/issue_template.rb:10:in `<class:IssueTemplate>'
plugins/redmine_issue_templates/app/models/issue_template.rb:3:in `<top (required)>'
plugins/redmine_issue_templates/app/controllers/issue_templates_controller.rb:14:in `index'
lib/redmine/sudo_mode.rb:78:in `sudo_mode'
I, [2024-03-26T07:44:28.513667 #80101] INFO -- : Rendered /usr/local/lib/ruby/gems/3.0.0/gems/actionpack-7.1.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (Duration: 4.3ms | Allocations: 8459)
I, [2024-03-26T07:44:28.514064 #80101] INFO -- : Rendered layout /usr/local/lib/ruby/gems/3.0.0/gems/actionpack-7.1.2/lib/action_dispatch/middleware/templates/rescues/layout.erb (Duration: 4.7ms | Allocations: 9539)
However, the include destination of lib/plugins/acts_as_xxx will also change from ActiveRecord::Base to ApplicationRecord when this patch is applied,
This will affect the Active Record model of Redmine plugins that use the acts_as_xxx method, and the base class will need to be changed to ApplicationRecord.
This changes affects Redmine plugins using the acts_as_xxx method, requiring a change in the base class to ApplicationRecord. The ApplicationRecord class does not exist before Redmine 5.1, so the class to be inherited should be changed depending on the situation.
Environment
Redmine version Redmine after revision r22619 (not yet released)
Summary
Due to the changes made in https://www.redmine.org/issues/38975, when running the Redmine Issue Templates on Redmine trunk, exceptions are thrown during the execution of
rake redmine:plugins:migrate
or when accessing the issue templates settings page.Description
https://www.redmine.org/issues/38975
This changes affects Redmine plugins using the
acts_as_xxx
method, requiring a change in the base class toApplicationRecord
. The ApplicationRecord class does not exist before Redmine 5.1, so the class to be inherited should be changed depending on the situation.Environment
Expected Results
Actual Results
Workaround
This is only a WORKAROUND. There are other model classes that should also be modified.